diff options
| author | IMFTool <imftool@t-online.de> | 2021-05-14 08:33:24 +0200 |
|---|---|---|
| committer | IMFTool <imftool@t-online.de> | 2021-05-14 08:33:24 +0200 |
| commit | 1b851da3d111beca7acd376e00c6179c179045ba (patch) | |
| tree | d1582269969b2a4e4713d80c8b87c048ff8d8260 /src | |
| parent | ade089c31cfcee8be93023835d7c2e49bf1ade38 (diff) | |
Allow BUILD_SHARED_LIBS to be specified on the cmake command line
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 11 |
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
|
