Created
February 14, 2022 16:18
-
-
Save SC-One/930d4ac4771ef2f727522420a550f2e0 to your computer and use it in GitHub Desktop.
add rapidjson from cmake (direct download rapidjson in CMake)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download RapidJSON | |
ExternalProject_Add( | |
rapidjson | |
PREFIX "vendor/rapidjson" | |
GIT_REPOSITORY "https://github.com/Tencent/rapidjson.git" | |
GIT_TAG f54b0e47a08782a6131cc3d60f94d038fa6e0a51 | |
TIMEOUT 10 | |
CMAKE_ARGS | |
-DRAPIDJSON_BUILD_TESTS=OFF | |
-DRAPIDJSON_BUILD_DOC=OFF | |
-DRAPIDJSON_BUILD_EXAMPLES=OFF | |
CONFIGURE_COMMAND "" | |
BUILD_COMMAND "" | |
INSTALL_COMMAND "" | |
UPDATE_COMMAND "" | |
) | |
# Prepare RapidJSON (RapidJSON is a header-only library) | |
ExternalProject_Get_Property(rapidjson source_dir) | |
set(RAPIDJSON_INCLUDE_DIR ${source_dir}/include) | |
# use case (Parent CMake): | |
include("${CMAKE_SOURCE_DIR}/vendor/rapidjson.cmake") | |
include_directories( | |
${CMAKE_SOURCE_DIR}/include | |
${GFLAGS_INCLUDE_DIR} | |
${BENCHMARK_INCLUDE_DIR} | |
${RAPIDJSON_INCLUDE_DIR} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment