summaryrefslogtreecommitdiffstats
path: root/src/corelib/CMakeLists.txt
diff options
context:
space:
mode:
authorVolker Krause <volker.krause@kdab.com>2019-06-05 15:29:20 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-06-05 14:59:48 +0000
commit64f17cca0449c4bcd2ba3590e0e9c481be46ac4c (patch)
tree5b358be12c0a49d5eb33a3ba2c8e61ebb3769912 /src/corelib/CMakeLists.txt
parent1143b07948340449158bddd3ec123cf2755b42e2 (diff)
Export installation locations compatible with qmake -query
Change-Id: I634bd1036ce197602d4acaf4535ab43227d120a8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/CMakeLists.txt')
-rw-r--r--src/corelib/CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index 0cc5cf3f10..1932af8b6d 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -10,6 +10,16 @@ if (NOT WrapDoubleConversion_FOUND)
sscanf_l/snprintf_l _snprintf_l/_sscanf_l. \
You need to use libdouble-conversion for double/string conversion.")
endif()
+
+# compute the reverse relative path from QtCoreConfigExtras to the install prefix
+# this is used in QtCoreConfigExtras to make its install paths relocatable
+if(QT_WILL_INSTALL)
+ get_filename_component(_clean_prefix "${CMAKE_INSTALL_PREFIX}/${QT_CONFIG_INSTALL_DIR}" ABSOLUTE)
+else()
+ get_filename_component(_clean_prefix "${QT_CONFIG_BUILD_DIR}" ABSOLUTE)
+endif()
+file(RELATIVE_PATH QT_INVERSE_CONFIG_INSTALL_DIR ${_clean_prefix} ${CMAKE_INSTALL_PREFIX})
+
# special case end
#####################################################################