diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2021-05-12 13:58:51 +0200 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2021-05-12 13:59:35 +0200 |
commit | 9cc3ca3e361551e9e5f7c2083e9a744d58f5f437 (patch) | |
tree | 3067e1aba06495578e9bbeb3d336fb26b52f2e1e /expat | |
parent | 309cd4aa4b470a3e496a5d72014148dd8a583529 (diff) | |
download | libexpat-git-9cc3ca3e361551e9e5f7c2083e9a744d58f5f437.tar.gz |
CMake: Support standard variable BUILD_SHARED_LIBS
https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html
Diffstat (limited to 'expat')
-rw-r--r-- | expat/CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 96ac5daa..ca9e6b9e 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -70,6 +70,11 @@ if(MSVC) else() set(_EXPAT_BUILD_PKGCONFIG_DEFAULT ON) endif() +if(DEFINED BUILD_SHARED_LIBS) + set(_EXPAT_SHARED_LIBS_DEFAULT ${BUILD_SHARED_LIBS}) +else() + set(_EXPAT_SHARED_LIBS_DEFAULT ON) +endif() # # Configuration @@ -77,7 +82,7 @@ endif() option(EXPAT_BUILD_TOOLS "build the xmlwf tool for expat library" ${_EXPAT_BUILD_TOOLS_DEFAULT}) option(EXPAT_BUILD_EXAMPLES "build the examples for expat library" ON) option(EXPAT_BUILD_TESTS "build the tests for expat library" ON) -option(EXPAT_SHARED_LIBS "build a shared expat library" ON) +option(EXPAT_SHARED_LIBS "build a shared expat library" ${_EXPAT_SHARED_LIBS_DEFAULT}) option(EXPAT_BUILD_DOCS "build man page for xmlwf" ${_EXPAT_BUILD_DOCS_DEFAULT}) option(EXPAT_BUILD_FUZZERS "build fuzzers for the expat library" OFF) option(EXPAT_BUILD_PKGCONFIG "build pkg-config file" ${_EXPAT_BUILD_PKGCONFIG_DEFAULT}) |