X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=cmake%2Fmodules%2FFindQt4.cmake;h=64a5ce40a4e13e413372d4f73f2cf76d6241b3df;hp=170e04b7beacc75a7a023ab651b060baae4751ef;hb=318483ddb3de556a4014cb2d5b5e6cd58b0718e2;hpb=79fbcfb49f7cc92a89f0158ebac1a3006a559e8a diff --git a/cmake/modules/FindQt4.cmake b/cmake/modules/FindQt4.cmake index 170e04b7..64a5ce40 100644 --- a/cmake/modules/FindQt4.cmake +++ b/cmake/modules/FindQt4.cmake @@ -246,6 +246,7 @@ # # QT_DOC_DIR Path to "doc" of Qt4 # QT_MKSPECS_DIR Path to "mkspecs" of Qt4 +# QT_TRANSLATIONS_DIR Path to "translations" of Qt4 # # # These are around for backwards compatibility @@ -482,6 +483,17 @@ IF (QT4_QMAKE_FOUND) FILE(TO_CMAKE_PATH "${qt_plugins_dir}" qt_plugins_dir) SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins") ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) + + # ask qmake for the translations directory + IF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR) + EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} + ARGS "-query QT_INSTALL_TRANSLATIONS" + OUTPUT_VARIABLE qt_translations_dir ) + # make sure we have / and not \ as qmake gives on windows + FILE(TO_CMAKE_PATH "${qt_translations_dir}" qt_translations_dir) + SET(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations") + ENDIF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR) + ######################################## # # Setting the INCLUDE-Variables