summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIMFTool <imftool@t-online.de>2021-05-14 08:33:24 +0200
committerIMFTool <imftool@t-online.de>2021-05-14 08:33:24 +0200
commit1b851da3d111beca7acd376e00c6179c179045ba (patch)
treed1582269969b2a4e4713d80c8b87c048ff8d8260 /src
parentade089c31cfcee8be93023835d7c2e49bf1ade38 (diff)
Allow BUILD_SHARED_LIBS to be specified on the cmake command line
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 756b057..85883a1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -30,9 +30,14 @@ else()
endif()
# This lib. doesn't export from dll with __declspec(dllexport). So this lib. must be built statically on Windows.
-if(NOT WIN32)
- set(BUILD_SHARED_LIBS true CACHE BOOL "Build shared or static libs?" FORCE)
-endif(NOT WIN32)
+if(WIN32)
+ if (BUILD_SHARED_LIBS) # from command line
+ message(STATUS "Building shared libs is not supported for WIN32")
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared or static libs?" FORCE)
+ endif()
+else()
+ set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared or static libs?")
+endif()
# ----------libkumu----------
# source