diff options
author | Gtker <git@gtker.com> | 2022-09-24 11:13:27 +0200 |
---|---|---|
committer | Gtker <git@gtker.com> | 2022-09-24 11:13:27 +0200 |
commit | 9d6fa9312fc26b87fd0aafb1812c53ebf7194e57 (patch) | |
tree | f81e96fd2672f394ea5f25defbd84522d0e67f60 | |
parent | 7a664bf6be4377aabe03f118fcdb6d1d3abc48f5 (diff) |
Add `STORM_USE_BUNDLED_LIBRARIES` option that defaults to OFF
This makes builds more reproducible since they aren't dependent on
whatever library happens to be installed.
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ec5998..9cf1050 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ include(CMakeDependentOption) option(BUILD_SHARED_LIBS "Compile shared libraries" OFF) option(STORM_SKIP_INSTALL "Skip installing files" OFF) +option(STORM_USE_BUNDLED_LIBRARIES + "Force use of bundled dependencies instead of system libraries." + OFF +) option(STORM_BUILD_TESTS "Compile StormLib test application" OFF # "BUILD_TESTING" OFF # Stay coherent with CTest variables @@ -286,7 +290,7 @@ add_definitions(-D_7ZIP_ST -DBZ_STRICT_ANSI) set(LINK_LIBS) find_package(ZLIB) -if (ZLIB_FOUND) +if (ZLIB_FOUND AND NOT STORM_USE_BUNDLED_LIBRARIES) set(LINK_LIBS ${LINK_LIBS} ZLIB::ZLIB) add_definitions(-D__SYS_ZLIB) else() @@ -294,7 +298,7 @@ else() endif() find_package(BZip2) -if (BZIP2_FOUND) +if (BZIP2_FOUND AND NOT STORM_USE_BUNDLED_LIBRARIES) set(LINK_LIBS ${LINK_LIBS} BZip2::BZip2) add_definitions(-D__SYS_BZLIB) else() |