aboutsummaryrefslogtreecommitdiff
path: root/modules/FindQt4.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/FindQt4.cmake')
-rw-r--r--modules/FindQt4.cmake46
1 files changed, 10 insertions, 36 deletions
diff --git a/modules/FindQt4.cmake b/modules/FindQt4.cmake
index 513b0cfe..55c44dfd 100644
--- a/modules/FindQt4.cmake
+++ b/modules/FindQt4.cmake
@@ -85,10 +85,6 @@
# the list of sources.
# To disable generating a namespace header, set the source file property
# NO_NAMESPACE to TRUE on the interface file.
-# To include a header in the interface header, set the source file property
-# INCLUDE to the name of the header.
-# To specify a class name to use, set the source file property CLASSNAME
-# to the name of the class.
#
# macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
# create the interface header and implementation files
@@ -96,10 +92,6 @@
# the name will be automatically determined from the name of the xml file
# To disable generating namespace headers, set the source file property
# NO_NAMESPACE to TRUE for these inputfiles.
-# To include a header in the interface header, set the source file property
-# INCLUDE to the name of the header.
-# To specify a class name to use, set the source file property CLASSNAME
-# to the name of the class.
#
# macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
# create a dbus adaptor (header and implementation file) from the xml file
@@ -267,24 +259,10 @@
# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
-
-# If Qt3 has already been found, fail.
-IF(QT_QT_LIBRARY)
- IF(Qt4_FIND_REQUIRED)
- MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project.")
- ELSE(Qt4_FIND_REQUIRED)
- IF(NOT Qt4_FIND_QUIETLY)
- MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project.")
- ENDIF(NOT Qt4_FIND_QUIETLY)
- RETURN()
- ENDIF(Qt4_FIND_REQUIRED)
-ENDIF(QT_QT_LIBRARY)
-
-
-IF (QT4_QMAKE_FOUND)
+if (QT4_QMAKE_FOUND)
# Check already done in this cmake run, nothing more to do
- RETURN()
-ENDIF (QT4_QMAKE_FOUND)
+
+else (QT4_QMAKE_FOUND)
# check that QT_NO_DEBUG is defined for release configurations
MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC)
@@ -523,9 +501,9 @@ IF (QT4_QMAKE_FOUND)
ENDIF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)
IF( NOT QT_INCLUDE_DIR)
- IF(Qt4_FIND_REQUIRED)
+ IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtGlobal header")
- ENDIF(Qt4_FIND_REQUIRED)
+ ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
ENDIF( NOT QT_INCLUDE_DIR)
#############################################
@@ -947,9 +925,9 @@ IF (QT4_QMAKE_FOUND)
ENDIF (QT_USE_FRAMEWORKS)
IF( NOT QT_QTCORE_LIBRARY )
- IF(Qt4_FIND_REQUIRED)
+ IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
- ENDIF(Qt4_FIND_REQUIRED)
+ ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
ENDIF( NOT QT_QTCORE_LIBRARY )
# Set QT_QTASSISTANT_LIBRARY
@@ -1276,11 +1254,6 @@ IF (QT4_QMAKE_FOUND)
SET(_params -m)
ENDIF ( _nonamespace )
- GET_SOURCE_FILE_PROPERTY(_classname ${_interface} CLASSNAME)
- IF ( _classname )
- SET(_params ${_params} -c ${_classname})
- ENDIF ( _classname )
-
GET_SOURCE_FILE_PROPERTY(_include ${_interface} INCLUDE)
IF ( _include )
SET(_params ${_params} -i ${_include})
@@ -1476,7 +1449,7 @@ IF (QT4_QMAKE_FOUND)
SET( QT_QT_LIBRARY "")
ELSE(QT4_QMAKE_FOUND)
-
+
SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
IF(Qt4_FIND_REQUIRED)
IF(QT4_INSTALLED_VERSION_TOO_OLD)
@@ -1489,6 +1462,7 @@ ELSE(QT4_QMAKE_FOUND)
MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
ENDIF(Qt4_FIND_REQUIRED)
-
+
+ENDIF (QT4_QMAKE_FOUND)
ENDIF (QT4_QMAKE_FOUND)