diff options
author | 2019-12-19 15:47:00 +0200 | |
---|---|---|
committer | 2019-12-19 15:47:00 +0200 | |
commit | 89d17b4f3dfd4f6503ce48e206b211c3bfb8dcee (patch) | |
tree | 960c530ac28c12dfea0bbeee14796f0258cda20c /meson.build | |
parent | 00ec4d4cd53c684d65c69c1b5419556fe295d62c (diff) | |
download | librin-89d17b4f3dfd4f6503ce48e206b211c3bfb8dcee.tar.gz librin-89d17b4f3dfd4f6503ce48e206b211c3bfb8dcee.tar.bz2 librin-89d17b4f3dfd4f6503ce48e206b211c3bfb8dcee.zip |
meson: simplify build scripts, prune some options.
Also inadvertently fixed a bug with defining _GNU_SOURCE at the wrong
time, which could have possibly led to unexpected build failures down
the line.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/meson.build b/meson.build index 8662782..91f07fc 100644 --- a/meson.build +++ b/meson.build @@ -1,29 +1,21 @@ project('librin', 'c', license : 'LGPL2.1', version : '0.0.4', - default_options : ['c_std=gnu89', 'buildtype=release']) + default_options : ['c_std=c11', 'buildtype=release']) inc = include_directories('include') pkg = import('pkgconfig') +add_project_arguments('-D_GNU_SOURCE', language : 'c') + subdir('include') subdir('src') -if ((not get_option('static')) and (not get_option('shared'))) - librin = library('rin', sources, version : meson.project_version(), include_directories : inc, install : true) -endif - -if get_option('static') - librin = static_library('rin', sources, version : meson.project_version(), include_directories : inc, install : true) -endif - -if get_option('shared') - librin = shared_library('rin', sources, version : meson.project_version(), include_directories : inc, install : true) -endif +librin = library('rin', sources, version : meson.project_version(), include_directories : inc, pic : get_option('enable-pic'), install : true) pkg.generate(librin) -if get_option('tests') +if get_option('enable-tests') subdir('test') endif |