From 2e5260d44c662d31357e0cd3e430957cddcf1a6e Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Tue, 27 Jun 2023 17:25:55 -0600 Subject: build: Default to using the static CRT for MSVC CMake 3.15 introduced CMAKE_MSVC_RUNTIME_LIBRARY as a way to control the CRT linked to by default. The old way of searching and replacing CMAKE__FLAGS does not work because CMake no longer adds the /MD flag in newer versions. Thus we can remove that code and replace it with a single instance of CMAKE_MSVC_RUNTIME_LIBRARY. --- cube/CMakeLists.txt | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'cube') diff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt index 5ed07775..9b16da31 100644 --- a/cube/CMakeLists.txt +++ b/cube/CMakeLists.txt @@ -177,28 +177,6 @@ endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -if(WIN32) - # Use static MSVCRT libraries - foreach(configuration - in - CMAKE_C_FLAGS_DEBUG - CMAKE_C_FLAGS_MINSIZEREL - CMAKE_C_FLAGS_RELEASE - CMAKE_C_FLAGS_RELWITHDEBINFO - CMAKE_CXX_FLAGS_DEBUG - CMAKE_CXX_FLAGS_MINSIZEREL - CMAKE_CXX_FLAGS_RELEASE - CMAKE_CXX_FLAGS_RELWITHDEBINFO) - if(${configuration} MATCHES "/MD") - string(REGEX - REPLACE "/MD" - "/MT" - ${configuration} - "${${configuration}}") - endif() - endforeach() -endif() - add_custom_command(COMMENT "Compiling cube vertex shader" OUTPUT cube.vert.inc COMMAND ${GLSLANG_VALIDATOR} -V -x -o ${CMAKE_CURRENT_BINARY_DIR}/cube.vert.inc -- cgit v1.2.3