summaryrefslogtreecommitdiff
path: root/src/linguist/linguist.pro
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-02-27 18:13:10 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-28 20:44:58 +0100
commit3a98e886dd9659f11e68d84fd742a71e1ad62741 (patch)
tree4d0694378355c3821c575ecf1c902b13ce349aff /src/linguist/linguist.pro
parente0a49e7242ad04fc51b8510378d689a6162a06d4 (diff)
downloadqttools-3a98e886dd9659f11e68d84fd742a71e1ad62741.tar.gz
Fix for Qt with specified bindir.
Change-Id: Ie4492269e8a7cd35959584bf09c02d4af5303917 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/linguist/linguist.pro')
-rw-r--r--src/linguist/linguist.pro21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/linguist/linguist.pro b/src/linguist/linguist.pro
index 1b2a1b791..a45fdc1b0 100644
--- a/src/linguist/linguist.pro
+++ b/src/linguist/linguist.pro
@@ -6,7 +6,26 @@ SUBDIRS = \
!no-png:!contains(QT_CONFIG, no-gui):SUBDIRS += linguist
win32:CMAKE_BIN_SUFFIX = ".exe"
-CMAKE_RELATIVE_INSTALL_DIR = "../../../"
+
+CMAKE_QT_INSTALL_PREFIX_ESCAPED = "^$$re_escape($$[QT_INSTALL_PREFIX])/"
+win32:CMAKE_QT_INSTALL_PREFIX_ESCAPED ~= s,\\\\,/
+
+CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]
+contains(CMAKE_LIB_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
+ CMAKE_LIB_DIR = $$replace(CMAKE_LIB_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", )
+ CMAKE_RELATIVE_INSTALL_DIR = $$replace(CMAKE_LIB_DIR, "[^/]+", ..)
+ # We need to go up another two levels because the CMake files are
+ # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
+ CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_DIR}/../../"
+}
+
+CMAKE_BIN_DIR = $$[QT_INSTALL_BINS]
+contains(CMAKE_BIN_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
+ CMAKE_BIN_DIR = $$replace(CMAKE_BIN_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", )
+} else {
+ CMAKE_BIN_DIR_IS_ABSOLUTE = True
+}
+
cmake_linguist_config_file.input = $$PWD/Qt5LinguistToolsConfig.cmake.in
cmake_linguist_config_file.output = $$OUT_PWD/Qt5LinguistToolsConfig.cmake
QMAKE_SUBSTITUTES += cmake_linguist_config_file