summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-02-11 13:21:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-13 01:14:42 +0100
commite95a758236cf2c68e33da4ddb62bff4fe8d9dd8b (patch)
tree77f81b6085bc4a053d13df5795458f58fed587a7 /mkspecs
parent8943a5a28e0559bce2bd412453840f951f796fbf (diff)
If the libdir is absolute, make the config file non-relocatable.
If Qt is configured with -libdir /some/dir/outside/the/install/prefix/, then for use absolute paths for the executables and include dirs too. Change-Id: I5ccf62be6f93f97d934df62038fe4cd40dca9a93 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index c6fec811cd..51d66822ae 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -3,7 +3,11 @@ if (CMAKE_VERSION VERSION_LESS 2.8.3)
message(FATAL_ERROR \"Qt 5 requires at least CMake version 2.8.3\")
endif()
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
+!!ELSE
+set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
+!!ENDIF
set(Qt5$${CMAKE_MODULE_NAME}_VERSION_MAJOR "$$eval(QT.$${MODULE}.MAJOR_VERSION)")
set(Qt5$${CMAKE_MODULE_NAME}_VERSION_MINOR "$$eval(QT.$${MODULE}.MINOR_VERSION)")