-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrapidjson.cmake
More file actions
23 lines (19 loc) · 764 Bytes
/
rapidjson.cmake
File metadata and controls
23 lines (19 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if(NOT TARGET rapidjson)
include(ExternalProject)
ExternalProject_Add (
rapidjson
URL "https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz"
CMAKE_ARGS "-G${CMAKE_GENERATOR}"
"-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -fPIC"
"-DRAPIDJSON_BUILD_EXAMPLES=OFF"
"-DRAPIDJSON_HAS_STDSTRING=ON"
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
BUILD_COMMAND ""
BUILD_IN_SOURCE 1
INSTALL_COMMAND ""
)
ExternalProject_Get_Property(rapidjson source_dir binary_dir)
set(RAPIDJSON_INCLUDE "${source_dir}/include" CACHE INTERNAL "RAPIDJSON Include Directories" FORCE)
endif()
add_dependencies(${PROJECT_NAME} rapidjson)
include_directories(${RAPIDJSON_INCLUDE})