diff options
| author | jiefangxuanyan <505745416@qq.com> | 2018-04-27 14:16:47 +0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-04-26 23:16:47 -0700 |
| commit | da1805f3c0542d6c584eddf627b2ebc34d2ce64d (patch) | |
| tree | 9448163e82f32f8b050a12eb78f5e36f3fb4cc1e | |
| parent | 402c962f755297f2829717cd2519ef87f894923d (diff) | |
| download | vcpkg-da1805f3c0542d6c584eddf627b2ebc34d2ce64d.tar.gz vcpkg-da1805f3c0542d6c584eddf627b2ebc34d2ce64d.zip | |
Fix #3250 (#3284)
* [rapidjson] Fix CMake target (#3250)
* [rapidjson] Bump control version. Add usage information.
| -rw-r--r-- | ports/rapidjson/CONTROL | 2 | ||||
| -rw-r--r-- | ports/rapidjson/portfile.cmake | 23 | ||||
| -rw-r--r-- | ports/rapidjson/usage | 4 |
3 files changed, 23 insertions, 6 deletions
diff --git a/ports/rapidjson/CONTROL b/ports/rapidjson/CONTROL index 0dd6333cf..7646755a5 100644 --- a/ports/rapidjson/CONTROL +++ b/ports/rapidjson/CONTROL @@ -1,3 +1,3 @@ Source: rapidjson -Version: 1.1.0 +Version: 1.1.0-1 Description: A fast JSON parser/generator for C++ with both SAX/DOM style API <http://rapidjson.org/> diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake index 54f1c8eea..4f87ed6f4 100644 --- a/ports/rapidjson/portfile.cmake +++ b/ports/rapidjson/portfile.cmake @@ -9,10 +9,23 @@ vcpkg_from_github( HEAD_REF master ) +# Use RapidJSON's own build process, skipping examples and tests +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DRAPIDJSON_BUILD_DOC:BOOL=OFF + -DRAPIDJSON_BUILD_EXAMPLES:BOOL=OFF + -DRAPIDJSON_BUILD_TESTS:BOOL=OFF + -DCMAKE_INSTALL_DIR:STRING=cmake +) +vcpkg_install_cmake() + +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +# Delete redundant directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc) + # Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidjson) +file(COPY ${SOURCE_PATH}/license.txt ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidjson) file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidjson/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidjson/copyright) - -# Copy the rapidjson header files -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") -vcpkg_copy_pdbs() diff --git a/ports/rapidjson/usage b/ports/rapidjson/usage new file mode 100644 index 000000000..81e541e17 --- /dev/null +++ b/ports/rapidjson/usage @@ -0,0 +1,4 @@ +The package rapidjson provides CMake integration:
+
+ find_package(RapidJSON REQUIRED)
+ target_include_directories(main PRIVATE ${RAPIDJSON_INCLUDE_DIRS})
|
