[wt] Fix absolute paths in installed share/wt/*.cmake files (#5083)

This commit is contained in:
Todor Prokopov 2019-03-06 01:27:53 +02:00 committed by Victor Romero
parent bf4af7afdc
commit 334eb170b1
2 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,4 @@
Source: wt
Version: 4.0.5
Version: 4.0.5-1
Description: Wt is a C++ library for developing web applications
Build-Depends: openssl, sqlite3, libpq, pango, glew, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic, boost-interprocess

View File

@ -43,6 +43,14 @@ vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/wt)
# Fix absolute paths.
file(GLOB CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/wt/*.cmake)
foreach(CMAKE_FILE ${CMAKE_FILES})
file(READ ${CMAKE_FILE} _contents)
string(REPLACE "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}" "\${_IMPORT_PREFIX}" _contents "${_contents}")
file(WRITE ${CMAKE_FILE} "${_contents}")
endforeach()
# There is no way to suppress installation of the headers and resource files in debug build.
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)