diff --git a/CMakeLists.txt b/CMakeLists.txt index da8ea3e..0ce4d9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,10 +11,10 @@ set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -if(MSVC_RUNTIME_DYNAMIC) - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL") -else() +if (VCPKG_TARGET_TRIPLET MATCHES "-static$") set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") +else() + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL") endif() find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)