diff options
| author | yurybura <yurybura@gmail.com> | 2018-05-11 13:33:49 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-11 13:33:49 +0300 |
| commit | 9535a5631ac212b1c657a02be3ed9398df30c96c (patch) | |
| tree | a1124b7b5d81606c6d7413bb7075e8bdbc6afad3 /ports/rapidjson | |
| parent | 92eb878b3efdb780097178125066a6070869c954 (diff) | |
| parent | 9a19dae13a0fa594245db2df45ec54a504bc82f3 (diff) | |
| download | vcpkg-9535a5631ac212b1c657a02be3ed9398df30c96c.tar.gz vcpkg-9535a5631ac212b1c657a02be3ed9398df30c96c.zip | |
Merge pull request #1 from Microsoft/master
update
Diffstat (limited to 'ports/rapidjson')
| -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})
|
