Merge pull request #5624 from Orphis/cmake_windows

cmake: Windows fixes
This commit is contained in:
Léo Lam 2021-04-24 18:11:23 +02:00 committed by GitHub
commit 302e8136a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,6 @@
find_program(CCACHE_BIN ccache)
find_program(CCACHE_BIN NAMES ccache sccache)
if(CCACHE_BIN)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_BIN})
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_BIN})
# ccache uses -I when compiling without preprocessor, which makes clang complain.
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")

View File

@ -0,0 +1,7 @@
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
foreach(f CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if("${${f}}" MATCHES "/Zi")
string(REGEX REPLACE "/Zi" "/Z7" "${f}" "${${f}}")
endif()
endforeach()
endif()

View File

@ -10,6 +10,8 @@ set(CMAKE_OSX_ARCHITECTURES "x86_64")
# handle configuration options
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12.0" CACHE STRING "")
set(CMAKE_USER_MAKE_RULES_OVERRIDE "CMake/FlagsOverride.cmake")
project(dolphin-emu)
# Name of the Dolphin distributor. If you redistribute Dolphin builds (forks,