-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f30c7b4
commit 91ac8fa
Showing
7 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Try find RapidJSON | ||
# | ||
# The following variables are set when RapidJSON is found: | ||
# RAPIDJSON_FOUND = Set to true, if all components of RapidJSON have been found. | ||
# RAPIDJSON_INCLUDES = Include path for the header files of RapidJSON | ||
# RAPIDJSON_LIBRARIES = Link these to use RapidJSON | ||
|
||
if (NOT RAPIDJSON_FOUND) | ||
if (NOT RAPIDJSON_ROOT_DIR) | ||
set (RAPIDJSON_ROOT_DIR ${CMAKE_INSTALL_PREFIX}) | ||
endif (NOT RAPIDJSON_ROOT_DIR) | ||
|
||
find_path (RAPIDJSON_INCLUDES | ||
NAMES rapidjson/rapidjson.h rapidjson/reader.h rapidjson/writer.h | ||
HINTS ${RAPIDJSON_ROOT_DIR} ${CMAKE_INSTALL_PREFIX} | ||
PATH_SUFFIXES include | ||
) | ||
|
||
find_package_handle_standard_args (RAPIDJSON DEFAULT_MSG RAPIDJSON_INCLUDES) | ||
|
||
if (RAPIDJSON_FOUND) | ||
get_filename_component (RAPIDJSON_ROOT_DIR ${RAPIDJSON_INCLUDES} PATH) | ||
|
||
if (NOT RAPIDJSON_FIND_QUIETLY) | ||
message (STATUS "Found components for RapidJSON") | ||
message (STATUS "RAPIDJSON_ROOT_DIR = ${RAPIDJSON_ROOT_DIR}") | ||
message (STATUS "RAPIDJSON_INCLUDES = ${RAPIDJSON_INCLUDES}") | ||
endif (NOT RAPIDJSON_FIND_QUIETLY) | ||
else (RAPIDJSON_FOUND) | ||
if (RAPIDJSON_FIND_REQUIRED) | ||
message (FATAL_ERROR "Could not find RapidJSON!") | ||
endif (RAPIDJSON_FIND_REQUIRED) | ||
endif (RAPIDJSON_FOUND) | ||
|
||
mark_as_advanced(RAPIDJSON_ROOT_DIR RAPIDJSON_INCLUDES) | ||
|
||
endif (NOT RAPIDJSON_FOUND) |
This file contains 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
15 changes: 15 additions & 0 deletions
15
depends/common/rapidjson/0001-cmake-standardise_config_installpath.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -151,11 +151,7 @@ SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The direct | ||
SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "Directory where lib will install") | ||
SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}" CACHE PATH "Path to the documentation") | ||
|
||
-IF(UNIX OR CYGWIN) | ||
- SET(_CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME}") | ||
-ELSEIF(WIN32) | ||
- SET(_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake") | ||
-ENDIF() | ||
+SET(_CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME}") | ||
SET(CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" CACHE PATH "The directory cmake files are installed in") | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_CXX17=ON -DRAPIDJSON_HAS_STDSTRING=ON |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2b521dba5c22eaae6e6e7d4d304cb317e2cf8c687c70046b02792c02f78c127e |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rapidjson https://github.com/Tencent/rapidjson/archive/f9d53419e912910fd8fa57d5705fa41425428c35.tar.gz |