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:
parent
aa6a29d7e1
commit
19784355f9
7 changed files with 308 additions and 115 deletions
18
externals/CMakeLists.txt
vendored
18
externals/CMakeLists.txt
vendored
|
@ -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()
|
||||
|
|
2
externals/cryptopp-cmake
vendored
2
externals/cryptopp-cmake
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 9327192b0095dc1f420b2082d37bd427b5750d48
|
||||
Subproject commit a99c80c26686e44eddf0432140ae397f3efbd0b3
|
2
externals/dynarmic
vendored
2
externals/dynarmic
vendored
|
@ -1 +1 @@
|
|||
Subproject commit ca0e264f4f962e29baa23a3282ce484625866b98
|
||||
Subproject commit 30f1a3c6289075ef4af08f5ec502be2fc8627a0c
|
2
externals/oaknut
vendored
2
externals/oaknut
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 9d091109deb445bc6e9289c6195a282b7c993d49
|
||||
Subproject commit 6b1d57ea7ed4882d32a91eeaa6557b0ecb4da152
|
Loading…
Add table
Add a link
Reference in a new issue