aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authormj-xmr <mjxmr@protonmail.com>2022-04-02 16:19:57 +0200
committermj-xmr <mjxmr@protonmail.com>2022-04-10 21:25:45 +0200
commit9c42b728ba23193e75d24336504018e9057cd7c9 (patch)
tree531bb99e760c6ef5b21156dc7a90b2992da653d7 /CMakeLists.txt
parentMerge pull request #8242 (diff)
downloadmonero-9c42b728ba23193e75d24336504018e9057cd7c9.tar.xz
CMake: Add missing BUILD_SHARED_LIBS option
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a0f11608c..3abd0722a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -472,9 +472,11 @@ endif()
option(STATIC "Link libraries statically" ${DEFAULT_STATIC})
# This is a CMake built-in switch that concerns internal libraries
-if (NOT DEFINED BUILD_SHARED_LIBS AND NOT STATIC AND CMAKE_BUILD_TYPE_LOWER STREQUAL "debug")
- set(BUILD_SHARED_LIBS ON)
+set(BUILD_SHARED_LIBS_DEFAULT OFF)
+if (NOT STATIC AND CMAKE_BUILD_TYPE_LOWER STREQUAL "debug")
+ set(BUILD_SHARED_LIBS_DEFAULT ON)
endif()
+option(BUILD_SHARED_LIBS "Build internal libraries as shared" ${BUILD_SHARED_LIBS_DEFAULT})
if (BUILD_SHARED_LIBS)
message(STATUS "Building internal libraries with position independent code")