[rapidjson] no absolute paths (#21662)

This commit is contained in:
autoantwort 2021-11-26 10:19:10 +01:00 committed by GitHub
parent 77d4d314c0
commit 2617697840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 8 deletions

View File

@ -8,23 +8,24 @@ vcpkg_from_github(
)
# Use RapidJSON's own build process, skipping examples and tests
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
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()
vcpkg_cmake_install()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib" "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/share/doc")
file(READ "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" _contents)
string(REPLACE "\${RapidJSON_SOURCE_DIR}" "\${RapidJSON_CMAKE_DIR}/../.." _contents "${_contents}")
string(REPLACE "set( RapidJSON_SOURCE_DIR \"${SOURCE_PATH}\")" "" _contents "${_contents}")
string(REPLACE "set( RapidJSON_DIR \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\")" "" _contents "${_contents}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" "${_contents}\nset(RAPIDJSON_INCLUDE_DIRS \"\${RapidJSON_INCLUDE_DIRS}\")\n")
file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,7 +1,17 @@
{
"name": "rapidjson",
"version-date": "2020-09-14",
"port-version": 1,
"port-version": 2,
"description": "A fast JSON parser/generator for C++ with both SAX/DOM style API <http://rapidjson.org/>",
"homepage": "http://rapidjson.org/"
"homepage": "http://rapidjson.org/",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -5890,7 +5890,7 @@
},
"rapidjson": {
"baseline": "2020-09-14",
"port-version": 1
"port-version": 2
},
"rapidxml": {
"baseline": "1.13",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "14f78d728ea7cd8b0872521a88e71162325a103f",
"version-date": "2020-09-14",
"port-version": 2
},
{
"git-tree": "6d70aec68e6db30b2fb6b659bc6f1453fe8c80a3",
"version-date": "2020-09-14",