diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-20 23:30:31 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-20 23:30:31 +0100 |
commit | e5a11fbb3251a98fafd6bebf0b6fc366acb19088 (patch) | |
tree | 8e1bd6704205307e0a23484221ea1bb67a9f411e /src/corelib/Qt5Config.cmake.in | |
parent | 0646d1131b4bc65cdd9af29f4ce00fdd2398a3df (diff) | |
parent | 76c0be34cd4ff4564693162fa7528463e23ce9d8 (diff) |
Merge "Merge branch 'dev' into stable" into refs/staging/stable
Diffstat (limited to 'src/corelib/Qt5Config.cmake.in')
-rw-r--r-- | src/corelib/Qt5Config.cmake.in | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/corelib/Qt5Config.cmake.in b/src/corelib/Qt5Config.cmake.in new file mode 100644 index 0000000000..408dd64496 --- /dev/null +++ b/src/corelib/Qt5Config.cmake.in @@ -0,0 +1,43 @@ + +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() + +get_filename_component(_qt5_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE) + +set(_Qt5_NOTFOUND_MESSAGE) + +foreach(module ${Qt5_FIND_COMPONENTS}) + find_package(Qt5${module} + ${_Qt5_FIND_PARTS_QUIET} + ${_Qt5_FIND_PARTS_REQUIRED} + PATHS \"${_qt5_install_prefix}\" NO_DEFAULT_PATH + ) + if (NOT Qt5${module}_FOUND) + if (Qt5_FIND_REQUIRED_${module}) + set(_Qt5_NOTFOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/lib/cmake/Qt5${module}/Qt5${module}Config.cmake\\\"\\n\") + elseif(NOT Qt5_FIND_QUIETLY) + message(WARNING \"Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/lib/cmake/Qt5${module}/Qt5${module}Config.cmake\\\"\") + endif() + endif() +endforeach() + +if (_Qt5_NOTFOUND_MESSAGE) + set(Qt5_NOT_FOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}\") + set(Qt5_FOUND False) +endif() |