aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMiriam Zimmerman <[email protected]>2024-09-16 19:56:53 -0400
committerGitHub <[email protected]>2024-09-17 11:56:53 +1200
commit877364f0509c9a54f2d7015a6a9b52b4c7c99edc (patch)
tree858158d6cffa9ae8f2f3031ea0501b2d57efa440
parent19d2f7bce6a4d0566a07f3187d2bc5f0ec95c1c4 (diff)
downloadcubeb-877364f0509c9a54f2d7015a6a9b52b4c7c99edc.tar.gz
cubeb-877364f0509c9a54f2d7015a6a9b52b4c7c99edc.zip
windows: Set debug options if appropriate. (#798)
* windows: Set debug options if appropriate. If building with debug, also build standard libraries with debug. This ensures that any libraries linking against cubeb won't have mismatched symbol definitions. * Properly allow dynamic linking. * Set global CMAKE_MSVC_RUNTIME_LIBRARY. This variable will apply to all targets, rather than needing to apply a per-target setting. * remove unnecessary whitespace * Simplify variable expression
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c65c00a..a5573ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,8 @@
# TODO
# - backend selection via command line, rather than simply detecting headers.
-cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
+cmake_policy(SET CMP0091 NEW)
project(cubeb
VERSION 0.0.0)
@@ -12,6 +13,8 @@ option(BUILD_TOOLS "Build tools" ON)
option(BUNDLE_SPEEX "Bundle the speex library" OFF)
option(LAZY_LOAD_LIBS "Lazily load shared libraries" ON)
option(USE_SANITIZERS "Use sanitizers" ON)
+# Set debugging for runtime libraries if requested.
+set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING