cmake workaround for CemuAsm failing to link on msbuild

This commit is contained in:
Exzap 2022-08-31 10:41:24 +02:00 committed by GitHub
parent 0630e8d845
commit e147c1b4a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,11 @@ x64util_masm.asm
) )
set_source_files_properties(x64util_masm.asm PROPERTIES LANGUAGE ASM_MASM) 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 "<CMAKE_AR> /OUT:<TARGET> <LINK_FLAGS> <OBJECTS>")
ELSE() ELSE()
# NASM # NASM
@ -35,4 +40,4 @@ set_target_properties(CemuAsm PROPERTIES LINKER_LANGUAGE C)
ENDIF() ENDIF()
set_property(TARGET CemuAsm PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") set_property(TARGET CemuAsm PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")