Fix CMake config for static MSVC builds

This commit is contained in:
Jonathan G Rennison
2023-11-14 00:06:53 +00:00
parent beee3cc369
commit 3bcc99dd95

View File

@@ -311,7 +311,6 @@ if(MSVC)
# If target -static is used, switch our project to static (/MT) too. # If target -static is used, switch our project to static (/MT) too.
# If the target ends on -static-md, it will remain dynamic (/MD). # If the target ends on -static-md, it will remain dynamic (/MD).
if(VCPKG_TARGET_TRIPLET MATCHES "-static" AND NOT VCPKG_TARGET_TRIPLET MATCHES "-md") if(VCPKG_TARGET_TRIPLET MATCHES "-static" AND NOT VCPKG_TARGET_TRIPLET MATCHES "-md")
set_property(TARGET openttd_lib PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET openttd PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") set_property(TARGET openttd PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET openttd_test PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") set_property(TARGET openttd_test PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif() endif()