From 0a7dc86a55574ca97dc2ab370d7a1d3eb0956d6e Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 16 Aug 2023 03:36:20 +0600 Subject: [PATCH] Allow building with static configurations --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index dc96588..f027140 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,12 @@ project(ZMusic LANGUAGES C CXX ) +if (VCPKG_TOOLCHAIN) + if(VCPKG_TARGET_TRIPLET MATCHES "-static$") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + endif() +endif() + list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) include(CMakePackageConfigHelpers)