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.
This commit is contained in:
Martchus 2021-11-04 23:22:26 +01:00
parent 1c0d6f166c
commit b3896eb65e
1 changed files with 1 additions and 1 deletions

View File

@ -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}"