build: Improve support for Windows cross-compilation. (#7389)

* build: Improve support for Windows cross-compilation.

* build: Move linuxdeploy download to bundle target execution time.
This commit is contained in:
Steveice10 2024-02-05 10:09:50 -08:00 committed by GitHub
parent aa6a29d7e1
commit 19784355f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 308 additions and 115 deletions

View file

@ -57,6 +57,12 @@ if(USE_SYSTEM_CRYPTOPP)
add_library(cryptopp INTERFACE)
target_link_libraries(cryptopp INTERFACE cryptopp::cryptopp)
else()
if (WIN32 AND NOT MSVC AND "arm64" IN_LIST ARCHITECTURE)
# TODO: CryptoPP ARM64 ASM does not seem to support Windows unless compiled with MSVC.
# TODO: See https://github.com/weidai11/cryptopp/issues/1260
set(CRYPTOPP_DISABLE_ASM ON CACHE BOOL "")
endif()
set(CRYPTOPP_BUILD_DOCUMENTATION OFF CACHE BOOL "")
set(CRYPTOPP_BUILD_TESTING OFF CACHE BOOL "")
set(CRYPTOPP_INSTALL OFF CACHE BOOL "")
@ -235,6 +241,18 @@ endif()
# DiscordRPC
if (USE_DISCORD_PRESENCE)
# rapidjson used by discord-rpc is old and doesn't correctly detect endianness for some platforms.
include(TestBigEndian)
test_big_endian(RAPIDJSON_BIG_ENDIAN)
if(RAPIDJSON_BIG_ENDIAN)
add_compile_definitions(RAPIDJSON_ENDIAN=1)
else()
add_compile_definitions(RAPIDJSON_ENDIAN=0)
endif()
# Apply a dummy CLANG_FORMAT_SUFFIX to disable discord-rpc's unnecessary automatic clang-format.
set(CLANG_FORMAT_SUFFIX "dummy")
add_subdirectory(discord-rpc EXCLUDE_FROM_ALL)
target_include_directories(discord-rpc INTERFACE ./discord-rpc/include)
endif()

@ -1 +1 @@
Subproject commit 9327192b0095dc1f420b2082d37bd427b5750d48
Subproject commit a99c80c26686e44eddf0432140ae397f3efbd0b3

2
externals/dynarmic vendored

@ -1 +1 @@
Subproject commit ca0e264f4f962e29baa23a3282ce484625866b98
Subproject commit 30f1a3c6289075ef4af08f5ec502be2fc8627a0c

2
externals/oaknut vendored

@ -1 +1 @@
Subproject commit 9d091109deb445bc6e9289c6195a282b7c993d49
Subproject commit 6b1d57ea7ed4882d32a91eeaa6557b0ecb4da152