Browse Source
[discord-rpc] fix c++17 rapidjson compile
Signed-off-by: crueter <crueter@eden-emu.dev>
pull/143/head
crueter
8 months ago
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
2 changed files with
34 additions and
2 deletions
-
.patch/discord-rpc/0003-fix-cpp17.patch
-
externals/CMakeLists.txt
|
|
@ -0,0 +1,31 @@ |
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
|
|
index 540d643..5d12f3d 100644
|
|
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
|
|
@@ -17,12 +17,14 @@ execute_process(
|
|
|
|
|
|
COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty |
|
|
|
|
|
ERROR_QUIET |
|
|
|
|
|
) |
|
|
|
|
|
+# new commit that fixes c++17
|
|
|
|
|
|
+set(RAPIDJSON_SHA 3b2441b87f99ab65f37b141a7b548ebadb607b96)
|
|
|
|
|
|
|
|
|
|
|
|
-find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
|
|
|
|
+find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-${RAPIDJSON_SHA} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
|
|
|
|
if (NOT RAPIDJSONTEST) |
|
|
|
|
|
message("no rapidjson, download") |
|
|
|
|
|
- set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/v1.1.0.tar.gz)
|
|
|
|
|
|
- file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz ${RJ_TAR_FILE})
|
|
|
|
|
|
+ set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/${RAPIDJSON_SHA}.tar.gz)
|
|
|
|
|
|
+ file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/${RAPIDJSON_SHA}.tar.gz ${RJ_TAR_FILE})
|
|
|
|
|
|
execute_process( |
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E tar xzf ${RJ_TAR_FILE} |
|
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty |
|
|
|
|
|
@@ -30,7 +32,7 @@ if (NOT RAPIDJSONTEST)
|
|
|
|
|
|
file(REMOVE ${RJ_TAR_FILE}) |
|
|
|
|
|
endif(NOT RAPIDJSONTEST) |
|
|
|
|
|
|
|
|
|
|
|
-find_file(RAPIDJSON NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
|
|
|
|
+find_file(RAPIDJSON NAMES rapidjson rapidjson-${RAPIDJSON_SHA} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
|
|
|
|
|
|
|
|
|
|
add_library(rapidjson STATIC IMPORTED ${RAPIDJSON}) |
|
|
|
|
|
|
|
|
@ -189,8 +189,9 @@ if (USE_DISCORD_PRESENCE) |
|
|
OPTIONS |
|
|
OPTIONS |
|
|
"BUILD_EXAMPLES OFF" |
|
|
"BUILD_EXAMPLES OFF" |
|
|
PATCHES |
|
|
PATCHES |
|
|
${CMAKE_SOURCE_DIR}/.patch/discord-rpc/0001-cmake-version.patch |
|
|
|
|
|
${CMAKE_SOURCE_DIR}/.patch/discord-rpc/0002-no-clang-format.patch |
|
|
|
|
|
|
|
|
${CMAKE_SOURCE_DIR}/.patch/discord-rpc/0001-cmake-version.patch |
|
|
|
|
|
${CMAKE_SOURCE_DIR}/.patch/discord-rpc/0002-no-clang-format.patch |
|
|
|
|
|
${CMAKE_SOURCE_DIR}/.patch/discord-rpc/0003-fix-cpp17.patch |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
target_include_directories(discord-rpc INTERFACE ${discord-rpc_SOURCE_DIR}/include) |
|
|
target_include_directories(discord-rpc INTERFACE ${discord-rpc_SOURCE_DIR}/include) |
|
|
|