From e147c1b4a6704c9fca2aa10cca31baec305eff9c Mon Sep 17 00:00:00 2001 From: Exzap <13877693+Exzap@users.noreply.github.com> Date: Wed, 31 Aug 2022 10:41:24 +0200 Subject: [PATCH] cmake workaround for CemuAsm failing to link on msbuild --- src/asm/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/asm/CMakeLists.txt b/src/asm/CMakeLists.txt index 527fb1fe..2ac36ed7 100644 --- a/src/asm/CMakeLists.txt +++ b/src/asm/CMakeLists.txt @@ -9,6 +9,11 @@ x64util_masm.asm ) set_source_files_properties(x64util_masm.asm PROPERTIES LANGUAGE ASM_MASM) +# workaround for cr flag being passed to LINK.exe which considers it an input file and thus fails +# doesn't always seem to happen. The Windows CI builds were fine, but locally I would run into this problem +# possibly related to https://gitlab.kitware.com/cmake/cmake/-/issues/18889 +set(CMAKE_ASM_MASM_CREATE_STATIC_LIBRARY " /OUT: ") + ELSE() # NASM @@ -35,4 +40,4 @@ set_target_properties(CemuAsm PROPERTIES LINKER_LANGUAGE C) ENDIF() -set_property(TARGET CemuAsm PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") \ No newline at end of file +set_property(TARGET CemuAsm PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>")