1 Commits
Author SHA1 Message Date
Kasuromi 8877d36cff Statically link CRT on Windows 2023-05-28 13:12:44 +03:00
+9
View File
@@ -101,6 +101,15 @@ elseif(SYSTEM.Android)
elseif(SYSTEM.Linux)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
elseif(SYSTEM.Windows)
# Statically link UCRT
if(NOT DOBBY_DEBUG)
add_compile_options(/MT)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MT")
else()
add_compile_options(/MTd)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MTd")
endif()
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /export:DobbyPrepare /export:DobbyHook /export:DobbyCommit /export:DobbyBuildVersion /export:DobbyDestroy")
if (DynamicBinaryInstrument)