From 4691b0253cac09c19fad7b902353e46a9f790b68 Mon Sep 17 00:00:00 2001 From: jonschz <17198703+jonschz@users.noreply.github.com> Date: Fri, 20 Jun 2025 06:53:42 +0200 Subject: [PATCH] Fix BETA10 linker settings (#1572) Co-authored-by: jonschz --- CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 37aa52ce..064a207e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -483,7 +483,12 @@ if(ISLE_BUILD_BETA10) OUT_TARGETS beta10_targets ) reccmp_add_target(beta10 ID BETA10) + + # Enable `#ifdef BETA10` conditions target_compile_definitions(beta10 PRIVATE BETA10) + foreach(tgt IN LISTS beta10_targets) + target_compile_definitions(${tgt} PRIVATE BETA10) + endforeach() endif() if (ISLE_BUILD_APP) @@ -600,10 +605,13 @@ if (MSVC_FOR_DECOMP) endif() endif() + # Setting the MSVC_RUNTIME_LIBRARY for all libraries as well as `lego1` produces the results + # that are most consistent with the LEGO1.DLL and BETA10.DLL originals we have. + # Equivalent to target_compile_options(... PRIVATE "/MT$<$:d>") + set_property(TARGET ${lego1_targets} ${beta10_targets} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") if(TARGET lego1) target_link_options(lego1 PRIVATE "/OPT:REF") - # Equivalent to target_compile_options(... PRIVATE "/MT$<$:d>") - set_property(TARGET lego1 ${lego1_targets} ${beta10_targets} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + set_property(TARGET lego1 PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") endif() set(CMAKE_CXX_FLAGS "/W3 /GX /D \"WIN32\" /D \"_WINDOWS\"")