diff options
author | Volker Krause <volker.krause@kdab.com> | 2019-06-05 15:29:20 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-05 14:59:48 +0000 |
commit | 64f17cca0449c4bcd2ba3590e0e9c481be46ac4c (patch) | |
tree | 5b358be12c0a49d5eb33a3ba2c8e61ebb3769912 /src/corelib/CMakeLists.txt | |
parent | 1143b07948340449158bddd3ec123cf2755b42e2 (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.txt | 10 |
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 ##################################################################### |