diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 2b9c1d3a..217d1772 100644 --- a/meson.build +++ b/meson.build @@ -60,16 +60,17 @@ sources = files( ) # Set appropriate arguments for building against the library type +extra_c_args = [] subdir('meson/library') if get_option('default_library') == 'static' - add_project_arguments(['-DSERD_STATIC'], language: ['c']) + extra_c_args = ['-DSERD_STATIC'] endif # Build shared and/or static library libserd = library( meson.project_name() + library_suffix, sources, - c_args: c_suppressions + [ + c_args: c_suppressions + extra_c_args + [ '-DSERD_INTERNAL', '-DSERD_VERSION="@0@"'.format(meson.project_version()), ], @@ -77,10 +78,12 @@ libserd = library( gnu_symbol_visibility: 'hidden', include_directories: include_dirs, install: true, - version: meson.project_version()) + version: meson.project_version(), +) # Declare dependency for internal meson dependants serd_dep = declare_dependency( + compile_args: extra_c_args, include_directories: include_dirs, link_with: libserd, ) @@ -89,6 +92,7 @@ serd_dep = declare_dependency( pkg.generate( libserd, description: 'A lightweight library for working with RDF', + extra_cflags: extra_c_args, filebase: versioned_name, name: get_option('title'), subdirs: [versioned_name], |