From 68352b445024c656a0c16f0f571bc6ec24b5535d Mon Sep 17 00:00:00 2001 From: MiniTurtle Date: Mon, 10 Jun 2024 15:24:51 +0300 Subject: [PATCH] fix cmakelist --- source/Irrlicht/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/Irrlicht/CMakeLists.txt b/source/Irrlicht/CMakeLists.txt index 4a4758f23..43ceac754 100644 --- a/source/Irrlicht/CMakeLists.txt +++ b/source/Irrlicht/CMakeLists.txt @@ -31,6 +31,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug") endif() set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) +set(MSVCRT_LIB "") if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_CXX_FLAGS_RELEASE "-O3") set(CMAKE_CXX_FLAGS_DEBUG "-g") @@ -49,6 +50,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") endif() elseif(MSVC) + set(MSVCRT_LIB "$<$:msvcrtd.lib> $<$:msvcrt.lib>") # if(CMAKE_BUILD_TYPE STREQUAL "Debug") # message("HELLO WORLD") # string(APPEND CMAKE_CXX_STANDARD_LIBRARIES " msvcrtd.lib") @@ -553,8 +555,7 @@ target_link_libraries(IrrlichtMt PRIVATE "$<$:winmm>" "$<$:${X11_X11_LIB}>" "$<$:${X11_Xi_LIB}>" - "$<$:msvcrtd.lib>" - "$<$:msvcrt.lib>" + ${MSVCRT_LIB} ) if (CMAKE_CONFIGURATION_TYPES)