diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-11-22 01:42:23 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-11-22 01:47:26 +0530 |
commit | 8f8a9b27a73c244efb3cf2ab8f4a743d1b0705cf (patch) | |
tree | 774f479af20e1fccd311bcf1d1484078bab1ec07 /orc-test | |
parent | 1abd4c1730213f849bf57cf85ae1591f7c53bc5f (diff) |
meson: Always build both shared and static libraries
This reuses objects from the shared library for the static library, so
it should not affect the build time at all.
orc_dep and orc_test_dep will still contain the library selected by
--default-library
Diffstat (limited to 'orc-test')
-rw-r--r-- | orc-test/meson.build | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/orc-test/meson.build b/orc-test/meson.build index 19c9123..994f391 100644 --- a/orc-test/meson.build +++ b/orc-test/meson.build @@ -9,7 +9,8 @@ else link_args = [] endif -orc_test_lib = library ('orc-test-' + orc_api, orc_test_sources, +orc_test_shr = shared_library ('orc-test-' + orc_api, + orc_test_sources, version : libversion, soversion : soversion, include_directories : orc_inc, @@ -19,5 +20,18 @@ orc_test_lib = library ('orc-test-' + orc_api, orc_test_sources, link_depends : 'orc-test.map', install : true) +orc_test_sta = static_library ('orc-test-' + orc_api, + objects : orc_test_shr.extract_all_objects(), + include_directories : orc_inc, + c_args : [ orc_c_args , '-DORC_ENABLE_UNSTABLE_API' ], + dependencies : [libm, orc_dep], + install : true) + +if get_option('default_library') == 'static' + orc_test_lib = orc_test_sta +else + orc_test_lib = orc_test_shr +endif + orc_test_dep = declare_dependency(include_directories : orc_inc, link_with : orc_test_lib) |