From ae14127e7131e5d7e747abf3f5988f8057c8ad48 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 12 Apr 2019 11:34:33 -0400 Subject: [PATCH] Meson: Do not always generate static library Since Meson 0.46.0 'default_library' can be set to 'both' when user wants both shared and static libraries. --- orc/meson.build | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/orc/meson.build b/orc/meson.build index 160061e..86f4262 100644 --- a/orc/meson.build +++ b/orc/meson.build @@ -101,7 +101,7 @@ orc_c_args = ['-DORC_ENABLE_UNSTABLE_API', '-D_GNU_SOURCE'] orc_dependencies = [libm, librt, liblog] -orc_shr = shared_library ('orc-' + orc_api, +orc_lib = library ('orc-' + orc_api, orc_sources, version : libversion, soversion : soversion, @@ -111,18 +111,9 @@ orc_shr = shared_library ('orc-' + orc_api, dependencies : orc_dependencies, install : true) -orc_sta = static_library ('orc-' + orc_api, - objects: orc_shr.extract_all_objects(), - include_directories : orc_inc, - c_args : orc_c_args + ['-DBUILDING_ORC'], - install : true) - +orc_dep_cargs = [] if get_option('default_library') == 'static' - orc_lib = orc_sta - orc_dep_cargs = ['-DORC_STATIC_COMPILATION'] -else - orc_lib = orc_shr - orc_dep_cargs = [] + orc_dep_cargs += ['-DORC_STATIC_COMPILATION'] endif orc_dep = declare_dependency(include_directories : orc_inc, -- 2.7.4