2013-01-11 13:53:25 +00:00
|
|
|
|
|
|
|
if (CMAKE_VERSION VERSION_LESS 2.8.9)
|
|
|
|
message(FATAL_ERROR \"Qt5 requires at least CMake version 2.8.9\")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT Qt5_FIND_COMPONENTS)
|
|
|
|
set(Qt5_NOT_FOUND_MESSAGE \"The Qt5 package requires at least one component\")
|
|
|
|
set(Qt5_FOUND False)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(_Qt5_FIND_PARTS_REQUIRED)
|
|
|
|
if (Qt5_FIND_REQUIRED)
|
|
|
|
set(_Qt5_FIND_PARTS_REQUIRED REQUIRED)
|
|
|
|
endif()
|
|
|
|
set(_Qt5_FIND_PARTS_QUIET)
|
|
|
|
if (Qt5_FIND_QUIETLY)
|
|
|
|
set(_Qt5_FIND_PARTS_QUIET QUIET)
|
|
|
|
endif()
|
|
|
|
|
2013-04-10 15:49:24 +00:00
|
|
|
get_filename_component(_qt5_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/..\" ABSOLUTE)
|
2013-01-11 13:53:25 +00:00
|
|
|
|
|
|
|
set(_Qt5_NOTFOUND_MESSAGE)
|
|
|
|
|
2016-11-25 10:12:54 +00:00
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/Qt5ModuleLocation.cmake)
|
|
|
|
|
2013-01-11 13:53:25 +00:00
|
|
|
foreach(module ${Qt5_FIND_COMPONENTS})
|
|
|
|
find_package(Qt5${module}
|
|
|
|
${_Qt5_FIND_PARTS_QUIET}
|
|
|
|
${_Qt5_FIND_PARTS_REQUIRED}
|
2016-11-25 10:12:54 +00:00
|
|
|
PATHS ${_qt5_module_paths} NO_DEFAULT_PATH
|
2013-01-11 13:53:25 +00:00
|
|
|
)
|
|
|
|
if (NOT Qt5${module}_FOUND)
|
2016-11-25 10:12:54 +00:00
|
|
|
string(CONFIGURE ${_qt5_module_location_template} _expected_module_location @ONLY)
|
|
|
|
|
2013-01-11 13:53:25 +00:00
|
|
|
if (Qt5_FIND_REQUIRED_${module})
|
2016-11-25 10:12:54 +00:00
|
|
|
set(_Qt5_NOTFOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_expected_module_location}\\\"\\n\")
|
2013-01-11 13:53:25 +00:00
|
|
|
elseif(NOT Qt5_FIND_QUIETLY)
|
2016-11-25 10:12:54 +00:00
|
|
|
message(WARNING \"Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_expected_module_location}\\\"\")
|
2013-01-11 13:53:25 +00:00
|
|
|
endif()
|
2016-11-25 10:12:54 +00:00
|
|
|
|
|
|
|
unset(_expected_module_location)
|
2013-01-11 13:53:25 +00:00
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
if (_Qt5_NOTFOUND_MESSAGE)
|
|
|
|
set(Qt5_NOT_FOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}\")
|
|
|
|
set(Qt5_FOUND False)
|
|
|
|
endif()
|
2013-05-14 12:33:15 +00:00
|
|
|
|
|
|
|
_qt5_Core_check_file_exists(\"${CMAKE_CURRENT_LIST_DIR}/Qt5ConfigVersion.cmake\")
|