CMake: Fix path to lrelease on debian.
authorStephen Kelly <stephen.kelly@kdab.com>
Mon, 17 Mar 2014 08:58:54 +0000 (09:58 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 17 Mar 2014 17:03:24 +0000 (18:03 +0100)
Use a patch similar to qtbase/v5.2.0-alpha1~74^2^2~38 (Fix usr-move
workaround in the presence of multi-arch., 2013-08-30) to include
the appropriate calculation.

Task-number: QTBUG-36673
Change-Id: Iea0b6c64c5959d7d6dfce922c41031183c1c23d9
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
src/linguist/Qt5LinguistToolsConfig.cmake.in
src/linguist/linguist.pro

index fac7cc6..ce71646 100644 (file)
@@ -13,7 +13,7 @@ get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
 get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
 get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5LinguistTools\" REALPATH)
 if(_realCurr STREQUAL _realOrig)
-    get_filename_component(_qt5_linguisttools_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR\" PATH)
+    get_filename_component(_qt5_linguisttools_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE)
 else()
     get_filename_component(_qt5_linguisttools_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
 endif()
index 2979a23..9cf4aa6 100644 (file)
@@ -18,10 +18,10 @@ contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND
 
 CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
 !contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
-    CMAKE_RELATIVE_INSTALL_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS])
+    CMAKE_RELATIVE_INSTALL_LIBS_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS])
     # 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_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../"
 } else {
     CMAKE_LIB_DIR_IS_ABSOLUTE = True
 }