Replace MSVC_RUNTIME_LIBRARY generator expression with a compile option

This commit is contained in:
Zopolis4 2022-09-07 14:30:36 +10:00
parent f8b5024c09
commit c66737ec3f
No known key found for this signature in database
GPG key ID: C1117D56FBC82774
13 changed files with 5 additions and 25 deletions

View file

@ -40,6 +40,11 @@ if (MSVC)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT CemuBin) set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT CemuBin)
# floating point model: precise, fiber safe optimizations # floating point model: precise, fiber safe optimizations
add_compile_options(/EHsc /fp:precise) add_compile_options(/EHsc /fp:precise)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(/MTd)
else()
add_compile_options(/MT)
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# Speeds up static linking (especially helpful in incremental compilation) # Speeds up static linking (especially helpful in incremental compilation)
if((CMAKE_LINKER MATCHES ".*lld-link.*") AND (CMAKE_AR MATCHES ".*llvm-lib.*")) if((CMAKE_LINKER MATCHES ".*lld-link.*") AND (CMAKE_AR MATCHES ".*llvm-lib.*"))
@ -127,7 +132,6 @@ if (ENABLE_CUBEB)
option(BUNDLE_SPEEX "" OFF) option(BUNDLE_SPEEX "" OFF)
set(USE_WINMM OFF CACHE BOOL "") set(USE_WINMM OFF CACHE BOOL "")
add_subdirectory("dependencies/cubeb" EXCLUDE_FROM_ALL) add_subdirectory("dependencies/cubeb" EXCLUDE_FROM_ALL)
set_property(TARGET cubeb PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
add_library(cubeb::cubeb ALIAS cubeb) add_library(cubeb::cubeb ALIAS cubeb)
endif() endif()
add_compile_definitions("HAS_CUBEB=1") add_compile_definitions("HAS_CUBEB=1")

View file

@ -72,8 +72,6 @@ if(WIN32)
) )
endif() endif()
set_property(TARGET CemuBin PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_target_properties(CemuBin PROPERTIES set_target_properties(CemuBin PROPERTIES
# multi-configuration generators will add a config subdirectory to RUNTIME_OUTPUT_DIRECTORY if no generator expression is used # multi-configuration generators will add a config subdirectory to RUNTIME_OUTPUT_DIRECTORY if no generator expression is used
# to get the same behavior everywhere we append an empty generator expression # to get the same behavior everywhere we append an empty generator expression

View file

@ -10,8 +10,6 @@ else()
add_library(CemuCafe ${CPP_FILES} ${H_FILES}) add_library(CemuCafe ${CPP_FILES} ${H_FILES})
endif() endif()
set_property(TARGET CemuCafe PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
target_include_directories(CemuCafe PUBLIC "../") target_include_directories(CemuCafe PUBLIC "../")
target_link_libraries(CemuCafe PRIVATE target_link_libraries(CemuCafe PRIVATE

View file

@ -4,8 +4,6 @@ file(GLOB_RECURSE CPP_FILES *.cpp)
file(GLOB_RECURSE H_FILES *.h) file(GLOB_RECURSE H_FILES *.h)
add_library(CemuComponents ${CPP_FILES} ${H_FILES}) add_library(CemuComponents ${CPP_FILES} ${H_FILES})
set_property(TARGET CemuComponents PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
target_include_directories(CemuComponents PUBLIC "../") target_include_directories(CemuComponents PUBLIC "../")
target_link_libraries(CemuComponents PRIVATE target_link_libraries(CemuComponents PRIVATE

View file

@ -4,8 +4,6 @@ file(GLOB CPP_FILES *.cpp)
file(GLOB H_FILES *.h) file(GLOB H_FILES *.h)
add_library(CemuCommon ${CPP_FILES} ${H_FILES}) add_library(CemuCommon ${CPP_FILES} ${H_FILES})
set_property(TARGET CemuCommon PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
if(WIN32) if(WIN32)
target_sources(CemuCommon PRIVATE target_sources(CemuCommon PRIVATE
windows/platform.cpp windows/platform.cpp

View file

@ -35,5 +35,3 @@ else()
set_target_properties(CemuAsm PROPERTIES LINKER_LANGUAGE C) set_target_properties(CemuAsm PROPERTIES LINKER_LANGUAGE C)
endif() endif()
set_property(TARGET CemuAsm PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

View file

@ -5,8 +5,6 @@ add_library(CemuAudio
IAudioAPI.h IAudioAPI.h
) )
set_property(TARGET CemuAudio PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
# move these to UI folder # move these to UI folder
target_sources(CemuAudio PRIVATE target_sources(CemuAudio PRIVATE
audioDebuggerWindow.cpp audioDebuggerWindow.cpp

View file

@ -4,8 +4,6 @@ file(GLOB CPP_FILES *.cpp)
file(GLOB H_FILES *.h) file(GLOB H_FILES *.h)
add_library(CemuConfig ${CPP_FILES} ${H_FILES}) add_library(CemuConfig ${CPP_FILES} ${H_FILES})
set_property(TARGET CemuConfig PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
target_include_directories(CemuConfig PUBLIC "../") target_include_directories(CemuConfig PUBLIC "../")
target_link_libraries(CemuConfig PRIVATE target_link_libraries(CemuConfig PRIVATE

View file

@ -4,8 +4,6 @@ file(GLOB_RECURSE CPP_FILES *.cpp)
file(GLOB_RECURSE H_FILES *.h) file(GLOB_RECURSE H_FILES *.h)
add_library(CemuGui ${CPP_FILES} ${H_FILES}) add_library(CemuGui ${CPP_FILES} ${H_FILES})
set_property(TARGET CemuGui PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
target_sources(CemuGui PRIVATE target_sources(CemuGui PRIVATE
wxcomponents/checkedlistctrl.cpp wxcomponents/checkedlistctrl.cpp
wxcomponents/checkedlistctrl.h wxcomponents/checkedlistctrl.h

View file

@ -2,8 +2,6 @@ project(imguiImpl)
add_library(imguiImpl) add_library(imguiImpl)
set_property(TARGET imguiImpl PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
target_sources(imguiImpl PRIVATE target_sources(imguiImpl PRIVATE
imgui_impl_opengl3.cpp imgui_impl_opengl3.cpp
imgui_impl_opengl3.h imgui_impl_opengl3.h

View file

@ -25,8 +25,6 @@ add_library(CemuInput
emulated/ClassicController.h emulated/ClassicController.h
) )
set_property(TARGET CemuInput PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
# SDL # SDL
target_sources(CemuInput PRIVATE target_sources(CemuInput PRIVATE
api/SDL/SDLController.cpp api/SDL/SDLController.cpp

View file

@ -1,7 +1,5 @@
add_library(CemuResource) add_library(CemuResource)
set_property(TARGET CemuResource PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
# icon resources # icon resources
if(UNIX) if(UNIX)
target_sources(CemuResource PRIVATE target_sources(CemuResource PRIVATE

View file

@ -5,8 +5,6 @@ file(GLOB_RECURSE H_FILES *.h)
add_library(CemuUtil ${CPP_FILES} ${H_FILES}) add_library(CemuUtil ${CPP_FILES} ${H_FILES})
set_property(TARGET CemuUtil PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
target_include_directories(CemuUtil PUBLIC "../") target_include_directories(CemuUtil PUBLIC "../")
target_link_libraries(CemuUtil PRIVATE target_link_libraries(CemuUtil PRIVATE