aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLadislav Zezula <zezula@volny.cz>2022-09-25 10:06:28 +0200
committerGitHub <noreply@github.com>2022-09-25 10:06:28 +0200
commit88b18d4d097ef6cabb4f99f3a48db172064ea119 (patch)
treef81e96fd2672f394ea5f25defbd84522d0e67f60
parent7a664bf6be4377aabe03f118fcdb6d1d3abc48f5 (diff)
parent9d6fa9312fc26b87fd0aafb1812c53ebf7194e57 (diff)
Merge pull request #264 from gtker/add-shared-lib-override
Hi, thanks for the contribution. I won't check it in any way, I'll assume that you tested it.
-rw-r--r--CMakeLists.txt8
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()