diff options
author | wdlkmpx <wdlkmpx@gmail.com> | 2023-06-13 16:00:48 +0000 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2023-08-01 11:05:44 +0200 |
commit | e813179555d9db5a6253b135e97dc8b3ca42a6c9 (patch) | |
tree | a1b827667d129b44202225d59baf0bebdbce7cd6 | |
parent | ad446d96d3f9425de457f28a42f461ddc104a4b7 (diff) | |
download | cmocka-e813179555d9db5a6253b135e97dc8b3ca42a6c9.zip cmocka-e813179555d9db5a6253b135e97dc8b3ca42a6c9.tar.gz cmocka-e813179555d9db5a6253b135e97dc8b3ca42a6c9.tar.bz2 |
meson.build: install library if not a subproject
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | meson.build | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 8eae406..33be57c 100644 --- a/meson.build +++ b/meson.build @@ -24,6 +24,11 @@ foreach func: ['calloc', 'exit', 'fprintf', 'free', 'longjmp', 'siglongjmp', conf.set('HAVE_@0@'.format(func.to_upper()), cc.has_function(func)) endforeach +install_lib = true +if meson.is_subproject() + install_lib = false +endif + code = '__thread int tls;' conf.set('HAVE_GCC_THREAD_LOCAL_STORAGE', cc.compiles(code, name : '__thread')) @@ -37,7 +42,7 @@ cmocka_includes = [include_directories('.'), include_directories('include')] libcmocka = library('cmocka', 'src/cmocka.c', c_args : ['-DHAVE_CONFIG_H'], include_directories : cmocka_includes, - install : meson.is_subproject(), + install : install_lib, override_options : ['c_std=gnu99'], dependencies : [cc.find_library('rt', required : false)]) |