summaryrefslogtreecommitdiff
path: root/conf/dist/config.cmake
diff options
context:
space:
mode:
authorKargatum <dowlandtop@yandex.com>2021-04-22 03:16:12 +0700
committerGitHub <noreply@github.com>2021-04-21 22:16:12 +0200
commit325dcfc9a6c9a83f9e107a06e11b8280feda2a5d (patch)
tree70c246b197294f920a632057c250cb77645ab14a /conf/dist/config.cmake
parent2c5cb29ad49063b7b0e4085f8624ab32786d382d (diff)
feat(Core/Build): add the possibility to link libraries dynamically (#5348)
Diffstat (limited to 'conf/dist/config.cmake')
-rw-r--r--conf/dist/config.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/conf/dist/config.cmake b/conf/dist/config.cmake
index 3b2000b638..d11b5a1db0 100644
--- a/conf/dist/config.cmake
+++ b/conf/dist/config.cmake
@@ -12,6 +12,19 @@ option(WITHOUT_GIT "Disable the GIT testing routines"
option(ENABLE_EXTRAS "Set to 0 to disable extra features optimizing performances" 1)
option(ENABLE_VMAP_CHECKS "Enable Checks relative to DisableMgr system on vmap" 1)
option(ENABLE_EXTRA_LOGS "Enable extra log functions that can be CPU intensive" 0)
+option(WITH_DYNAMIC_LINKING "Enable dynamic library linking." 0)
+
+IsDynamicLinkingRequired(WITH_DYNAMIC_LINKING_FORCED)
+
+if(WITH_DYNAMIC_LINKING AND WITH_DYNAMIC_LINKING_FORCED)
+ set(WITH_DYNAMIC_LINKING_FORCED OFF)
+endif()
+
+if(WITH_DYNAMIC_LINKING OR WITH_DYNAMIC_LINKING_FORCED)
+ set(BUILD_SHARED_LIBS ON)
+else()
+ set(BUILD_SHARED_LIBS OFF)
+endif()
# Source tree in IDE
set(WITH_SOURCE_TREE "hierarchical" CACHE STRING "Build the source tree for IDE's.")