From b3896eb65e9886da760b9ba35492dcf5feb3b4de Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 4 Nov 2021 23:22:26 +0100 Subject: [PATCH] Check for relative paths also under install prefix In the "normal" case none of the other variables are set and thus relative paths (e.g. for the plugin directory) cannot be resolved. This should still work when CMAKE_FIND_ROOT_PATH is set beause we still check within the other locations. --- cmake/modules/QtLinkage.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/QtLinkage.cmake b/cmake/modules/QtLinkage.cmake index 715ddb5..091f58f 100644 --- a/cmake/modules/QtLinkage.cmake +++ b/cmake/modules/QtLinkage.cmake @@ -192,7 +192,7 @@ function (query_qmake_variable_path QMAKE_VARIABLE) return() # skip if CMake version too old like on Leap 15.1 endif () foreach (ROOT_PATH ${CMAKE_FIND_ROOT_PATH} "") - foreach (PREFIX_PATH ${CMAKE_PREFIX_PATH} "") + foreach (PREFIX_PATH ${CMAKE_INSTALL_PREFIX} ${CMAKE_PREFIX_PATH} "") string(JOIN "/" FULL_PATH ${ROOT_PATH} ${PREFIX_PATH} ${VARIABLE_VALUE}) if (EXISTS "${FULL_PATH}") set("${QMAKE_VARIABLE}"