mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-09 23:57:59 +00:00
Externals
Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
184133495b
commit
f6fb07b9aa
|
|
@ -169,6 +169,31 @@ if (MSVC AND NOT CXX_CLANG)
|
|||
set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} /W3 /WX-")
|
||||
endif()
|
||||
|
||||
# Set runtime library to MD/MDd for all configurations
|
||||
if(MSVC)
|
||||
if (YUZU_USE_BUNDLED_QT AND ARCHITECTURE_arm64)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set(libflag MT)
|
||||
else()
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
set(libflag MD)
|
||||
endif()
|
||||
|
||||
# Force all projects (including external dependencies) to use the same runtime
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /${libflag}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /${libflag}d")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /${libflag}")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /${libflag}d")
|
||||
|
||||
# Add this to ensure Cubeb uses the same runtime
|
||||
add_compile_options(
|
||||
$<$<CONFIG:Debug>:/${libflag}d>
|
||||
$<$<CONFIG:Release>:/${libflag}>
|
||||
$<$<CONFIG:RelWithDebInfo>:/${libflag}>
|
||||
$<$<CONFIG:MinSizeRel>:/${libflag}>
|
||||
)
|
||||
endif()
|
||||
|
||||
# TODO(crueter): Cleanup, each dep that has a bundled option should allow to choose between bundled, external, system
|
||||
cmake_dependent_option(YUZU_USE_EXTERNAL_SDL2 "Build SDL2 from external source" OFF "NOT MSVC;NOT ANDROID" OFF)
|
||||
cmake_dependent_option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}" "NOT ANDROID" OFF)
|
||||
|
|
@ -688,31 +713,6 @@ if (MSVC AND CXX_CLANG)
|
|||
link_libraries(llvm-mingw-runtime)
|
||||
endif()
|
||||
|
||||
# Set runtime library to MD/MDd for all configurations
|
||||
if(MSVC)
|
||||
if (YUZU_USE_BUNDLED_QT AND ARCHITECTURE_arm64)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set(libflag MT)
|
||||
else()
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
set(libflag MD)
|
||||
endif()
|
||||
|
||||
# Force all projects (including external dependencies) to use the same runtime
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /${libflag}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /${libflag}d")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /${libflag}")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /${libflag}d")
|
||||
|
||||
# Add this to ensure Cubeb uses the same runtime
|
||||
add_compile_options(
|
||||
$<$<CONFIG:Debug>:/${libflag}d>
|
||||
$<$<CONFIG:Release>:/${libflag}>
|
||||
$<$<CONFIG:RelWithDebInfo>:/${libflag}>
|
||||
$<$<CONFIG:MinSizeRel>:/${libflag}>
|
||||
)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
# Set yuzu project or yuzu-cmd project as default StartUp Project in Visual Studio depending on whether QT is enabled or not
|
||||
|
|
|
|||
Loading…
Reference in a new issue