summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2021-05-13 18:33:26 +0200
committerGitHub <noreply@github.com>2021-05-13 18:33:26 +0200
commit31bce2cc813ed63bb7ba45cd97f1a5586b817188 (patch)
tree63038300e49e386077eced53f5a5ab6985551377
parent9fd364942bb310c4cb5f1e62e8d7655c96bef9ed (diff)
parent7e080292711c61b901c66af8d2a76fe259c6cd59 (diff)
downloadlibexpat-git-31bce2cc813ed63bb7ba45cd97f1a5586b817188.tar.gz
Merge pull request #481 from libexpat/issue-471-cmake-support-build-shared-libs
CMake: Support variable BUILD_SHARED_LIBS (fixes #471)
-rw-r--r--expat/CMakeLists.txt7
-rw-r--r--expat/Changes1
2 files changed, 7 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})
diff --git a/expat/Changes b/expat/Changes
index 770d3079..ebd238bb 100644
--- a/expat/Changes
+++ b/expat/Changes
@@ -41,6 +41,7 @@ Release X.X.X XXX XXXXX XX XXXX
#457 Unexpose symbol _INTERNAL_trim_to_complete_utf8_characters
#458 #459 CMake: Support absolute paths for both CMAKE_INSTALL_LIBDIR
and CMAKE_INSTALL_INCLUDEDIR
+ #471 #481 CMake: Add support for standard variable BUILD_SHARED_LIBS
#468 #469 xmlwf: Improve help output and the xmlwf man page
Special thanks to: