rapidjson as external cmake project
This commit is contained in:
@@ -8,7 +8,10 @@ set(THIRD_PARTY_DIR ${CMAKE_BINARY_DIR}/third_party)
|
||||
|
||||
find_package (Threads REQUIRED)
|
||||
|
||||
include(cmake/rapidjson.cmake)
|
||||
include(cmake/Pistache.cmake)
|
||||
|
||||
include_directories(${RAPIDJSON_INCLUDE_DIR})
|
||||
|
||||
add_subdirectory(daggy)
|
||||
add_subdirectory(tests)
|
||||
|
||||
21
cmake/rapidjson.cmake
Normal file
21
cmake/rapidjson.cmake
Normal file
@@ -0,0 +1,21 @@
|
||||
include(ExternalProject)
|
||||
# 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)
|
||||
Reference in New Issue
Block a user