mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 11:07:10 +01:00
[rapidjson] Fix --head support (#3693)
This commit is contained in:
parent
db72758b1c
commit
bcf7db4d46
@ -26,8 +26,15 @@ vcpkg_install_cmake()
|
|||||||
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
||||||
|
|
||||||
# Delete redundant directories
|
# Delete redundant directories
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc)
|
||||||
|
|
||||||
# Put the licence file where vcpkg expects it
|
# Put the licence file where vcpkg expects it
|
||||||
file(COPY ${SOURCE_PATH}/license.txt ${CMAKE_CURRENT_LIST_DIR}/usage 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)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidjson/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidjson/copyright)
|
||||||
|
|
||||||
|
if(VCPKG_USE_HEAD_VERSION)
|
||||||
|
file(READ "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" _contents)
|
||||||
|
string(REPLACE "\${RapidJSON_SOURCE_DIR}" "\${RapidJSON_CMAKE_DIR}/../.." _contents "${_contents}")
|
||||||
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" "${_contents}\nset(RAPIDJSON_INCLUDE_DIRS \"\${RapidJSON_INCLUDE_DIRS}\")\n")
|
||||||
|
# Note: adding this extra setting for RAPIDJSON_INCLUDE_DIRS maintains compatibility with previous rapidjson versions
|
||||||
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user