diff options
author | David Robillard <d@drobilla.net> | 2022-07-14 10:10:09 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-07-14 10:10:09 -0400 |
commit | 6a92545f92950a7588eac35372c0d61eb1634f69 (patch) | |
tree | af769fc7f2c09c7cf538f746f72747a4ce7ba532 /meson.build | |
parent | f66b3149b61daa3ad0efee87819ebc2c5bd7ac89 (diff) | |
download | zix-6a92545f92950a7588eac35372c0d61eb1634f69.tar.gz zix-6a92545f92950a7588eac35372c0d61eb1634f69.tar.bz2 zix-6a92545f92950a7588eac35372c0d61eb1634f69.zip |
Simplify linking against static libraries
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meson.build b/meson.build index ee8f456..828262f 100644 --- a/meson.build +++ b/meson.build @@ -102,13 +102,13 @@ sources = files( # Set appropriate arguments for building against the library type subdir('meson/library') if get_option('default_library') == 'static' - add_project_arguments(['-DZIX_STATIC'], language: ['c']) + extra_c_args = ['-DZIX_STATIC'] endif # Set any additional arguments required for building libraries or programs -library_c_args = platform_c_args + ['-DZIX_INTERNAL'] +library_c_args = platform_c_args + extra_c_args + ['-DZIX_INTERNAL'] library_link_args = [] -program_c_args = [] +program_c_args = extra_c_args program_link_args = [] if cc.get_id() == 'emscripten' wasm_c_args = [ @@ -148,6 +148,7 @@ libzix = library( # Declare dependency for internal meson dependants zix_dep = declare_dependency( + compile_args: extra_c_args, include_directories: include_dirs, link_with: libzix, ) @@ -156,6 +157,7 @@ zix_dep = declare_dependency( pkg.generate( libzix, description: 'A lightweight portability and data structure C library', + extra_cflags: extra_c_args, filebase: versioned_name, name: 'Zix', subdirs: [versioned_name], |