From 919856ad455b5d486cb404820aaaead5cd73b9a7 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Wed, 8 Apr 2020 21:33:54 +0200 Subject: [PATCH] fix some remaining absolute paths. (#10746) --- ports/qt5-base/CONTROL | 2 +- ports/qt5-base/cmake/qt_fix_prl.cmake | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index 11248c4476..9109ea40cf 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,5 +1,5 @@ Source: qt5-base -Version: 5.12.5-12 +Version: 5.12.5-13 Homepage: https://www.qt.io/ Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components. Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl, angle (!windows), egl-registry, icu (!uwp), fontconfig (!windows) diff --git a/ports/qt5-base/cmake/qt_fix_prl.cmake b/ports/qt5-base/cmake/qt_fix_prl.cmake index 214f7cdb46..7035534d88 100644 --- a/ports/qt5-base/cmake/qt_fix_prl.cmake +++ b/ports/qt5-base/cmake/qt_fix_prl.cmake @@ -1,10 +1,13 @@ function(qt_fix_prl PACKAGE_DIR PRL_FILES) file(TO_CMAKE_PATH "${PACKAGE_DIR}/lib" CMAKE_LIB_PATH) file(TO_CMAKE_PATH "${PACKAGE_DIR}/include" CMAKE_INCLUDE_PATH) + file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}" CMAKE_INSTALLED_PREFIX) foreach(PRL_FILE IN LISTS PRL_FILES) file(READ "${PRL_FILE}" _contents) string(REPLACE "${CMAKE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") string(REPLACE "${CMAKE_INCLUDE_PATH}" "\$\$[QT_INSTALL_HEADERS]" _contents "${_contents}") - file(WRITE "${PRL_FILE}" "${_contents}") + string(REPLACE "${CMAKE_INSTALLED_PREFIX}" "\$\$[QT_INSTALL_PREFIX]" _contents "${_contents}") + #Note: This only works without an extra if case since QT_INSTALL_PREFIX is the same for debug and release + file(WRITE "${PRL_FILE}" "${_contents}") endforeach() endfunction() \ No newline at end of file