summaryrefslogtreecommitdiff
path: root/CMake/options.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMake/options.cmake')
-rw-r--r--CMake/options.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/CMake/options.cmake b/CMake/options.cmake
index 6e2443cfb..5dad843d0 100644
--- a/CMake/options.cmake
+++ b/CMake/options.cmake
@@ -77,6 +77,24 @@ set (OPTION_ABI_VERSION ""
)
set (FL_ABI_VERSION ${OPTION_ABI_VERSION})
+
+#######################################################################
+# Select MSVC (Visual Studio) Runtime: DLL (/MDx) or static (/MTx)
+# where x = 'd' for Debug builds, empty ('') for non-Debug builds.
+# Note: this might be handled better by the 'MSVC_RUNTIME_LIBRARY'
+# target property for each target rather than setting a global
+# CMake variable - but this version does the latter.
+#######################################################################
+
+if (MSVC)
+ option (FLTK_MSVC_RUNTIME_DLL "use MSVC Runtime-DLL (/MDx)" ON)
+ if (FLTK_MSVC_RUNTIME_DLL)
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
+ else ()
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
+ endif ()
+endif (MSVC)
+
#######################################################################
# Bundled Library Options
#######################################################################