some syncing with the FindQt4.cmake from KDE
-remove the parentheses in the if() conditions, they don't change the result, and without them these lines are identical to the ones in FindQt4.cmake from KDE -mention which qmake was used for finding Qt Alex
This commit is contained in:
parent
a9fa71a47c
commit
e364dc784f
|
@ -498,38 +498,38 @@ IF (QT4_QMAKE_FOUND)
|
||||||
ENDIF (APPLE)
|
ENDIF (APPLE)
|
||||||
|
|
||||||
# ask qmake for the binary dir
|
# ask qmake for the binary dir
|
||||||
IF ((QT_LIBRARY_DIR AND NOT QT_BINARY_DIR) OR QT_QMAKE_CHANGED)
|
IF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED)
|
||||||
EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
|
EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
|
||||||
ARGS "-query QT_INSTALL_BINS"
|
ARGS "-query QT_INSTALL_BINS"
|
||||||
OUTPUT_VARIABLE qt_bins )
|
OUTPUT_VARIABLE qt_bins )
|
||||||
# make sure we have / and not \ as qmake gives on windows
|
# make sure we have / and not \ as qmake gives on windows
|
||||||
FILE(TO_CMAKE_PATH "${qt_bins}" qt_bins)
|
FILE(TO_CMAKE_PATH "${qt_bins}" qt_bins)
|
||||||
SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE)
|
SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE)
|
||||||
ENDIF ((QT_LIBRARY_DIR AND NOT QT_BINARY_DIR) OR QT_QMAKE_CHANGED)
|
ENDIF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED)
|
||||||
|
|
||||||
# ask qmake for the include dir
|
# ask qmake for the include dir
|
||||||
IF ((QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR) OR QT_QMAKE_CHANGED)
|
IF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED)
|
||||||
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
|
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
|
||||||
ARGS "-query QT_INSTALL_HEADERS"
|
ARGS "-query QT_INSTALL_HEADERS"
|
||||||
OUTPUT_VARIABLE qt_headers )
|
OUTPUT_VARIABLE qt_headers )
|
||||||
# make sure we have / and not \ as qmake gives on windows
|
# make sure we have / and not \ as qmake gives on windows
|
||||||
FILE(TO_CMAKE_PATH "${qt_headers}" qt_headers)
|
FILE(TO_CMAKE_PATH "${qt_headers}" qt_headers)
|
||||||
SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "" FORCE)
|
SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "" FORCE)
|
||||||
ENDIF ((QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR) OR QT_QMAKE_CHANGED)
|
ENDIF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED)
|
||||||
|
|
||||||
|
|
||||||
# ask qmake for the documentation directory
|
# ask qmake for the documentation directory
|
||||||
IF ((QT_LIBRARY_DIR AND NOT QT_DOC_DIR) OR QT_QMAKE_CHANGED)
|
IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED)
|
||||||
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
|
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
|
||||||
ARGS "-query QT_INSTALL_DOCS"
|
ARGS "-query QT_INSTALL_DOCS"
|
||||||
OUTPUT_VARIABLE qt_doc_dir )
|
OUTPUT_VARIABLE qt_doc_dir )
|
||||||
# make sure we have / and not \ as qmake gives on windows
|
# make sure we have / and not \ as qmake gives on windows
|
||||||
FILE(TO_CMAKE_PATH "${qt_doc_dir}" qt_doc_dir)
|
FILE(TO_CMAKE_PATH "${qt_doc_dir}" qt_doc_dir)
|
||||||
SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE)
|
SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE)
|
||||||
ENDIF ((QT_LIBRARY_DIR AND NOT QT_DOC_DIR) OR QT_QMAKE_CHANGED)
|
ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED)
|
||||||
|
|
||||||
# ask qmake for the mkspecs directory
|
# ask qmake for the mkspecs directory
|
||||||
IF ((QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR) OR QT_QMAKE_CHANGED)
|
IF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
|
||||||
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
|
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
|
||||||
ARGS "-query QMAKE_MKSPECS"
|
ARGS "-query QMAKE_MKSPECS"
|
||||||
OUTPUT_VARIABLE qt_mkspecs_dirs )
|
OUTPUT_VARIABLE qt_mkspecs_dirs )
|
||||||
|
@ -542,27 +542,27 @@ IF (QT4_QMAKE_FOUND)
|
||||||
FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs}
|
FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs}
|
||||||
DOC "The location of the Qt mkspecs containing qconfig.pri"
|
DOC "The location of the Qt mkspecs containing qconfig.pri"
|
||||||
NO_DEFAULT_PATH )
|
NO_DEFAULT_PATH )
|
||||||
ENDIF ((QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR) OR QT_QMAKE_CHANGED)
|
ENDIF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
|
||||||
|
|
||||||
# ask qmake for the plugins directory
|
# ask qmake for the plugins directory
|
||||||
IF ((QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) OR QT_QMAKE_CHANGED)
|
IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED)
|
||||||
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
|
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
|
||||||
ARGS "-query QT_INSTALL_PLUGINS"
|
ARGS "-query QT_INSTALL_PLUGINS"
|
||||||
OUTPUT_VARIABLE qt_plugins_dir )
|
OUTPUT_VARIABLE qt_plugins_dir )
|
||||||
# make sure we have / and not \ as qmake gives on windows
|
# make sure we have / and not \ as qmake gives on windows
|
||||||
FILE(TO_CMAKE_PATH "${qt_plugins_dir}" qt_plugins_dir)
|
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" FORCE)
|
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)
|
ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED)
|
||||||
|
|
||||||
# ask qmake for the translations directory
|
# ask qmake for the translations directory
|
||||||
IF ((QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR) OR QT_QMAKE_CHANGED)
|
IF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED)
|
||||||
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
|
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
|
||||||
ARGS "-query QT_INSTALL_TRANSLATIONS"
|
ARGS "-query QT_INSTALL_TRANSLATIONS"
|
||||||
OUTPUT_VARIABLE qt_translations_dir )
|
OUTPUT_VARIABLE qt_translations_dir )
|
||||||
# make sure we have / and not \ as qmake gives on windows
|
# make sure we have / and not \ as qmake gives on windows
|
||||||
FILE(TO_CMAKE_PATH "${qt_translations_dir}" qt_translations_dir)
|
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)
|
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)
|
ENDIF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED)
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
#
|
#
|
||||||
|
@ -1360,7 +1360,7 @@ IF (QT4_QMAKE_FOUND)
|
||||||
QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
|
QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
|
||||||
SET( QT4_FOUND "YES" )
|
SET( QT4_FOUND "YES" )
|
||||||
INCLUDE(FindPackageMessage)
|
INCLUDE(FindPackageMessage)
|
||||||
FIND_PACKAGE_MESSAGE(Qt4 "Found Qt-Version ${QTVERSION}"
|
FIND_PACKAGE_MESSAGE(Qt4 "Found Qt-Version ${QTVERSION} (using ${QT_QMAKE_EXECUTABLE})"
|
||||||
"[${QT_LIBRARY_DIR}][${QT_INCLUDE_DIR}][${QT_MOC_EXECUTABLE}][${QT_UIC_EXECUTABLE}][${QT_RCC_EXECUTABLE}]")
|
"[${QT_LIBRARY_DIR}][${QT_INCLUDE_DIR}][${QT_MOC_EXECUTABLE}][${QT_UIC_EXECUTABLE}][${QT_RCC_EXECUTABLE}]")
|
||||||
ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
|
ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
|
||||||
QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
|
QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
|
||||||
|
|
Loading…
Reference in New Issue