mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-05 15:52:45 +02:00
Transfers the majority of submodules and large externals to CPM, using source archives rather than full Git clones. Not only does this save massive amounts of clone and configure time, but dependencies are grabbed on-demand rather than being required by default. Additionally, CPM will (generally) automatically search for system dependencies, though certain dependencies have options to control this. Testing shows gains ranging from 5x to 10x in terms of overall clone/configure time. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/143 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
32 lines
1.5 KiB
Diff
32 lines
1.5 KiB
Diff
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})
|
|
|