[Cmake-commits] [cmake-commits] clinton committed FindQt4.cmake 1.142 1.143
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Dec 15 18:48:50 EST 2008
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv2491
Modified Files:
FindQt4.cmake
Log Message:
BUG: Fix for #8247.
Add QT_TRANSLATIONS_DIR pointing to the Qt translation files, and docs for it.
Also add docs for QT_BINARY_DIR.
Index: FindQt4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt4.cmake,v
retrieving revision 1.142
retrieving revision 1.143
diff -C 2 -d -r1.142 -r1.143
*** FindQt4.cmake 25 Nov 2008 21:56:44 -0000 1.142
--- FindQt4.cmake 15 Dec 2008 23:48:48 -0000 1.143
***************
*** 200,206 ****
# QT_PHONON_INCLUDE_DIR Path to "include/phonon"
#
# QT_LIBRARY_DIR Path to "lib" of Qt4
- #
# QT_PLUGINS_DIR Path to "plugins" for Qt4
#
#
--- 200,209 ----
# QT_PHONON_INCLUDE_DIR Path to "include/phonon"
#
+ # QT_BINARY_DIR Path to "bin" of Qt4
# QT_LIBRARY_DIR Path to "lib" of Qt4
# QT_PLUGINS_DIR Path to "plugins" for Qt4
+ # QT_TRANSLATIONS_DIR Path to "translations" of Qt4
+ # QT_DOC_DIR Path to "doc" of Qt4
+ # QT_MKSPECS_DIR Path to "mkspecs" of Qt4
#
#
***************
*** 244,250 ****
# QT_LRELEASE_EXECUTABLE Where to find the lrelease tool.
#
- # QT_DOC_DIR Path to "doc" of Qt4
- # QT_MKSPECS_DIR Path to "mkspecs" of Qt4
- #
#
# These are around for backwards compatibility
--- 247,250 ----
***************
*** 474,477 ****
--- 474,488 ----
SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins" FORCE)
ENDIF ((QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) OR QT_QMAKE_CHANGED)
+
+ # ask qmake for the translations directory
+ IF ((QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR) OR QT_QMAKE_CHANGED)
+ 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" FORCE)
+ ENDIF ((QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR) OR QT_QMAKE_CHANGED)
+
########################################
#
***************
*** 555,559 ****
# Make variables changeble to the advanced user
! MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR QT_PLUGINS_DIR)
# Set QT_INCLUDES
--- 566,571 ----
# Make variables changeble to the advanced user
! MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR
! QT_PLUGINS_DIR QT_TRANSLATIONS_DIR)
# Set QT_INCLUDES
More information about the Cmake-commits
mailing list