[Cmake-commits] CMake branch, next, updated. v2.8.7-3043-gf569ddc

Rolf Eike Beer eike at sf-mail.de
Fri Mar 2 12:36:45 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  f569ddcd9c28864067062b6a8dad5a5b1db74348 (commit)
       via  678c24d230d7abcdb2ace778d59b8c1286d86a8a (commit)
       via  91a1670f47c0836c93d7bf355591bf84ecb3f99f (commit)
       via  9dae4d65d7e1ae0348478c6c2f4d2f0f307bf573 (commit)
       via  2cd898d54b7068d78d719ad23131707b300624a7 (commit)
      from  e5d26ece6bc9175ae400575256e8a899c50c941e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f569ddcd9c28864067062b6a8dad5a5b1db74348
commit f569ddcd9c28864067062b6a8dad5a5b1db74348
Merge: e5d26ec 678c24d
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Mar 2 12:36:29 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Mar 2 12:36:29 2012 -0500

    Merge topic 'improve-findqt3' into next
    
    678c24d FindQt3: fix detection of Qt3 include directory
    91a1670 FindQt3: let FPHSA handle the version selection
    9dae4d6 FindQt3: fix version extraction for versions with letters
    2cd898d FindQt3: fix warning when Qt3 is not found


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=678c24d230d7abcdb2ace778d59b8c1286d86a8a
commit 678c24d230d7abcdb2ace778d59b8c1286d86a8a
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Mar 2 17:31:34 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Fri Mar 2 18:08:37 2012 +0100

    FindQt3: fix detection of Qt3 include directory
    
    The include directory is likely not inside ../bin

diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index 89276ef..2d8dbde 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -47,13 +47,16 @@ IF(QT4_FOUND)
 ENDIF(QT4_FOUND)
 
 
-FILE(GLOB GLOB_PATHS_BIN /usr/lib/qt-3*/bin/)
+FILE(GLOB GLOB_PATHS /usr/lib/qt-3*)
+FOREACH(GLOB_PATH ${GLOB_PATHS})
+  LIST(APPEND GLOB_PATHS_BIN "${GLOB_PATH}/bin")
+ENDFOREACH(GLOB_PATH)
 FIND_PATH(QT_INCLUDE_DIR qt.h
   "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
   "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
   "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
   $ENV{QTDIR}/include
-  ${GLOB_PATHS_BIN}
+  ${GLOB_PATHS}
   /usr/local/qt/include
   /usr/lib/qt/include
   /usr/lib/qt3/include

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=91a1670f47c0836c93d7bf355591bf84ecb3f99f
commit 91a1670f47c0836c93d7bf355591bf84ecb3f99f
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Mar 2 16:56:41 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Fri Mar 2 18:08:37 2012 +0100

    FindQt3: let FPHSA handle the version selection

diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index 5ee2d06..89276ef 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -1,10 +1,11 @@
 # - Locate Qt include paths and libraries
 # This module defines:
-#  QT_INCLUDE_DIR - where to find qt.h, etc.
-#  QT_LIBRARIES   - the libraries to link against to use Qt.
-#  QT_DEFINITIONS - definitions to use when
-#                   compiling code that uses Qt.
-#  QT_FOUND       - If false, don't try to use Qt.
+#  QT_INCLUDE_DIR    - where to find qt.h, etc.
+#  QT_LIBRARIES      - the libraries to link against to use Qt.
+#  QT_DEFINITIONS    - definitions to use when
+#                      compiling code that uses Qt.
+#  QT_FOUND          - If false, don't try to use Qt.
+#  QT_VERSION_STRING - the version of Qt found
 #
 # If you need the multithreaded version of Qt, set QT_MT_REQUIRED to TRUE
 #
@@ -77,6 +78,7 @@ IF(QT_INCLUDE_DIR)
   # Under windows the qt library (MSVC) has the format qt-mtXYZ where XYZ is the
   # version X.Y.Z, so we need to remove the dots from version
   STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}")
+  SET(QT_VERSION_STRING "${qt_version_str}")
 ENDIF(QT_INCLUDE_DIR)
 
 FILE(GLOB GLOB_PATHS_LIB /usr/lib/qt-3*/lib/)
@@ -195,58 +197,16 @@ IF (WIN32)
     )
 ENDIF (WIN32)
 
-
-IF (QT_MIN_VERSION)
-
-  STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" qt_major_vers "${qt_version_str}")
-  STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" qt_minor_vers "${qt_version_str}")
-  STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" qt_patch_vers "${qt_version_str}")
-
-  #now parse the parts of the user given version string into variables
-  STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+$" req_qt_major_vers "${QT_MIN_VERSION}")
-  IF (NOT req_qt_major_vers)
-    error_message(  "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"3.1.5\"")
-  ENDIF (NOT req_qt_major_vers)
-
-  STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}")
-  STRING(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}")
-  STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}")
-
-  # req = "6.5.4", qt = "3.2.1"
-  MACRO(error_message msg)
-    IF(QT3_REQUIRED)
-      MESSAGE( FATAL_ERROR ${msg})
-    ELSE(QT3_REQUIRED)
-      MESSAGE( STATUS ${msg})
-    ENDIF(QT3_REQUIRED)
-  ENDMACRO(error_message)
-
-  IF (req_qt_major_vers GREATER qt_major_vers)                  # (6 > 3) ?
-    ERROR_MESSAGE(  "Qt major version not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})")            # yes
-  ELSE  (req_qt_major_vers GREATER qt_major_vers)               # no
-    IF (req_qt_major_vers LESS qt_major_vers)                  # (6 < 3) ?
-      SET( QT_VERSION_BIG_ENOUGH "YES" )                      # yes
-    ELSE (req_qt_major_vers LESS qt_major_vers)                # ( 6==3) ?
-      IF (req_qt_minor_vers GREATER qt_minor_vers)            # (5>2) ?
-        ERROR_MESSAGE(  "Qt minor version not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})")      # yes
-      ELSE (req_qt_minor_vers GREATER qt_minor_vers)          # no
-        IF (req_qt_minor_vers LESS qt_minor_vers)            # (5<2) ?
-          SET( QT_VERSION_BIG_ENOUGH "YES" )                # yes
-        ELSE (req_qt_minor_vers LESS qt_minor_vers)          # (5==2)
-          IF (req_qt_patch_vers GREATER qt_patch_vers)      # (4>1) ?
-            ERROR_MESSAGE(  "Qt patch level not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})")  # yes
-          ELSE (req_qt_patch_vers GREATER qt_patch_vers)    # (4>1) ?
-            SET( QT_VERSION_BIG_ENOUGH "YES" )             # yes
-          ENDIF (req_qt_patch_vers GREATER qt_patch_vers)   # (4>1) ?
-        ENDIF (req_qt_minor_vers LESS qt_minor_vers)
-      ENDIF (req_qt_minor_vers GREATER qt_minor_vers)
-    ENDIF (req_qt_major_vers LESS qt_major_vers)
-  ENDIF (req_qt_major_vers GREATER qt_major_vers)
-ENDIF (QT_MIN_VERSION)
+#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()
+IF(NOT Qt3_FIND_VERSION AND QT_MIN_VERSION)
+  SET(Qt3_FIND_VERSION ${QT_MIN_VERSION})
+ENDIF(NOT Qt3_FIND_VERSION AND QT_MIN_VERSION)
 
 # if the include a library are found then we have it
 INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt3  DEFAULT_MSG  QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt3
+                                  REQUIRED_VARS QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE
+                                  VERSION_VAR QT_VERSION_STRING)
 SET(QT_FOUND ${QT3_FOUND} )
 
 IF(QT_FOUND)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9dae4d65d7e1ae0348478c6c2f4d2f0f307bf573
commit 9dae4d65d7e1ae0348478c6c2f4d2f0f307bf573
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Mar 2 18:06:57 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Fri Mar 2 18:08:37 2012 +0100

    FindQt3: fix version extraction for versions with letters

diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index 69d2f65..5ee2d06 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -71,8 +71,8 @@ ENDIF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
 IF(QT_INCLUDE_DIR)
   #extract the version string from qglobal.h
   FILE(READ ${QT_INCLUDE_DIR}/qglobal.h QGLOBAL_H)
-  STRING(REGEX MATCH "#define[\t ]+QT_VERSION_STR[\t ]+\"([0-9]+.[0-9]+.[0-9]+)\"" QGLOBAL_H "${QGLOBAL_H}")
-  STRING(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+)\".*" "\\1" qt_version_str "${QGLOBAL_H}")
+  STRING(REGEX MATCH "#define[\t ]+QT_VERSION_STR[\t ]+\"[0-9]+.[0-9]+.[0-9]+[a-z]*\"" QGLOBAL_H "${QGLOBAL_H}")
+  STRING(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+[a-z]*)\".*" "\\1" qt_version_str "${QGLOBAL_H}")
 
   # Under windows the qt library (MSVC) has the format qt-mtXYZ where XYZ is the
   # version X.Y.Z, so we need to remove the dots from version

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2cd898d54b7068d78d719ad23131707b300624a7
commit 2cd898d54b7068d78d719ad23131707b300624a7
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Mar 2 16:55:17 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Fri Mar 2 17:02:03 2012 +0100

    FindQt3: fix warning when Qt3 is not found
    
    -- Could NOT find Qt3 (missing:  QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE)
    CreateProcess failed QT_MOC_EXECUTABLE-NOTFOUND -v
    CreateProcess failed QT_UIC_EXECUTABLE-NOTFOUND -version

diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index 86236cc..69d2f65 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -296,8 +296,16 @@ IF(QT_FOUND)
   ENDIF(QT_QT_LIBRARY MATCHES "qt-mt")
 ENDIF(QT_FOUND)
 
-EXEC_PROGRAM(${QT_MOC_EXECUTABLE} ARGS "-v" OUTPUT_VARIABLE QTVERSION_MOC)
-EXEC_PROGRAM(${QT_UIC_EXECUTABLE} ARGS "-version" OUTPUT_VARIABLE QTVERSION_UIC)
+IF(QT_MOC_EXECUTABLE)
+  EXECUTE_PROCESS(COMMAND ${QT_MOC_EXECUTABLE} "-v"
+                  OUTPUT_VARIABLE QTVERSION_MOC
+                  ERROR_QUIET)
+ENDIF(QT_MOC_EXECUTABLE)
+IF(QT_UIC_EXECUTABLE)
+  EXECUTE_PROCESS(COMMAND ${QT_UIC_EXECUTABLE} "-version"
+                  OUTPUT_VARIABLE QTVERSION_UIC
+                  ERROR_QUIET)
+ENDIF(QT_UIC_EXECUTABLE)
 
 SET(_QT_UIC_VERSION_3 FALSE)
 IF("${QTVERSION_UIC}" MATCHES ".* 3..*")

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindQt3.cmake |   91 +++++++++++++++++--------------------------------
 1 files changed, 31 insertions(+), 60 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list