Skip to content

Commit 725a38e

Browse files
committed
enable modern CMake CRT handling
1 parent b214dec commit 725a38e

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Install CMake config files to lib/cmake/slick-socket/
66
- Export library targets with proper install commands
77
- Enable downstream projects to use find_package(slick-socket)
8+
- Enable modern CMake CRT handling. Only sets a default if the user/toolchain hasn't already specified it
89

910
#v1.0.4 - [01/12/2026]
1011
- Rename repository from slick_socket to slick-socket (hyphenated naming follows recommended convention)

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ project(slick-socket
1111

1212
# MSVC configuration
1313
if(MSVC)
14-
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
14+
# Enable policy CMP0091 to allow CMAKE_MSVC_RUNTIME_LIBRARY to be controlled by toolchain/user
15+
cmake_policy(SET CMP0091 NEW)
16+
17+
# Only set default if not already specified by user or toolchain (e.g., vcpkg)
18+
if(NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
19+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
20+
endif()
1521
endif()
1622

1723
if (NOT CMAKE_BUILD_TYPE)

0 commit comments

Comments
 (0)