message(FATAL_ERROR"FindQt was called with invalid version '${Qt_FIND_VERSION}'. Only Qt major versions 3 or 4 are supported. If you do not need to support both Qt3 and Qt4 in your source consider calling find_package(Qt3) or find_package(Qt4) instead of find_package(Qt) instead.")
set(DESIRED_QT_VERSION0CACHESTRING"Pick a version of Qt to use: 3 or 4")
else()
# if only one found then pick that one
if(QT3_INSTALLEDANDNOTDESIRED_QT_VERSIONEQUAL4)
set(DESIRED_QT_VERSION3CACHESTRING"Pick a version of Qt to use: 3 or 4")
endif()
if(QT4_INSTALLEDANDNOTDESIRED_QT_VERSIONEQUAL3)
set(DESIRED_QT_VERSION4CACHESTRING"Pick a version of Qt to use: 3 or 4")
endif()
endif()
if(DESIRED_QT_VERSIONEQUAL3)
set(Qt3_FIND_REQUIRED${Qt_FIND_REQUIRED})
set(Qt3_FIND_QUIETLY${Qt_FIND_QUIETLY})
include(${CMAKE_CURRENT_LIST_DIR}/FindQt3.cmake)
endif()
if(DESIRED_QT_VERSIONEQUAL4)
set(Qt4_FIND_REQUIRED${Qt_FIND_REQUIRED})
set(Qt4_FIND_QUIETLY${Qt_FIND_QUIETLY})
include(${CMAKE_CURRENT_LIST_DIR}/FindQt4.cmake)
endif()
if(NOTQT3_INSTALLEDANDNOTQT4_INSTALLED)
if(QT_REQUIRED)
message(SEND_ERROR"CMake was unable to find any Qt versions, put qmake in your path, or set QT_QMAKE_EXECUTABLE.")
endif()
else()
if(NOTQT_FOUNDANDNOTDESIRED_QT_VERSION)
if(QT_REQUIRED)
message(SEND_ERROR"Multiple versions of Qt found please set DESIRED_QT_VERSION")
else()
message("Multiple versions of Qt found please set DESIRED_QT_VERSION")
endif()
endif()
if(NOTQT_FOUNDANDDESIRED_QT_VERSION)
if(QT_REQUIRED)
message(FATAL_ERROR"CMake was unable to find Qt version: ${DESIRED_QT_VERSION}. Set advanced values QT_QMAKE_EXECUTABLE and QT${DESIRED_QT_VERSION}_QGLOBAL_H_FILE, if those are set then QT_QT_LIBRARY or QT_LIBRARY_DIR.")
else()
message("CMake was unable to find desired Qt version: ${DESIRED_QT_VERSION}. Set advanced values QT_QMAKE_EXECUTABLE and QT${DESIRED_QT_VERSION}_QGLOBAL_H_FILE.")