Skip to content

Commit

Permalink
Add RapidYAML as ecosystem libs
Browse files Browse the repository at this point in the history
  • Loading branch information
Coldwings committed Apr 9, 2024
1 parent e8db8d2 commit 9a96265
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ set(PHOTON_GFLAGS_SOURCE "https://github.com/gflags/gflags/archive/refs/tags/v2.
set(PHOTON_GOOGLETEST_SOURCE "https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz" CACHE STRING "")
set(PHOTON_RAPIDJSON_SOURCE "https://github.com/Tencent/rapidjson/archive/refs/tags/v1.1.0.zip" CACHE STRING "")
set(PHOTON_RAPIDXML_SOURCE "https://sourceforge.net/projects/rapidxml/files/rapidxml/rapidxml%201.13/rapidxml-1.13.zip/download" CACHE STRING "")
set(PHOTON_RAPIDYAML_SOURCE "https://github.com/biojppm/rapidyaml/releases/download/v0.5.0/rapidyaml-0.5.0.hpp" CACHE STRING "")
set(PHOTON_CPP_REDIS_SOURCE "https://github.com/cpp-redis/cpp_redis/archive/refs/tags/4.3.1.tar.gz" CACHE STRING "")

# Get CPU arch and number
Expand Down
14 changes: 13 additions & 1 deletion ecosystem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ FetchContent_Declare(
FetchContent_MakeAvailable(rapidxml)
message(STATUS "Rapidxml source dir: ${rapidxml_SOURCE_DIR}")

# RapidYAML
# Single header file so should set DOWNLOAD_NO_EXTRACT
FetchContent_Declare(
rapidyaml
URL ${PHOTON_RAPIDYAML_SOURCE}
URL_HASH
SHA256=09a5be64f7add04e24a675704a16b3aea7ed80e9ff73d865a3b92301971d0815
DOWNLOAD_NO_EXTRACT 1
UPDATE_DISCONNECTED 1)
FetchContent_MakeAvailable(rapidyaml)
message(STATUS "Rapidyaml source dir: ${rapidyaml_SOURCE_DIR}")

# cpp-redis
FetchContent_Declare(
cpp-redis
Expand All @@ -48,7 +60,7 @@ message(STATUS "cpp-redis source dir: ${cpp-redis_SOURCE_DIR}")
add_library(ecosystem_deps INTERFACE)
target_include_directories(
ecosystem_deps
INTERFACE ${rapidjson_SOURCE_DIR}/include ${rapidxml_SOURCE_DIR}
INTERFACE ${rapidjson_SOURCE_DIR}/include ${rapidxml_SOURCE_DIR} ${rapidyaml_SOURCE_DIR}
${cpp-redis_SOURCE_DIR}/includes)
get_property(
incs
Expand Down

0 comments on commit 9a96265

Please sign in to comment.