diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-02-02 19:14:25 +0100 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2012-02-02 22:20:24 +0100 |
commit | 1dd6b3b7604783119769746b5fd12cca5fa8beb4 (patch) | |
tree | 798a351c724465a8cfc2a6ffa77ae52f54eeb796 /modules/FindQt5Transitional.cmake | |
parent | b7bec845e2da25ec3a75d3a315dd0aa5bd07b159 (diff) | |
download | extra-cmake-modules-1dd6b3b7604783119769746b5fd12cca5fa8beb4.tar.gz extra-cmake-modules-1dd6b3b7604783119769746b5fd12cca5fa8beb4.tar.bz2 |
Add some porting modules to ECM.
Diffstat (limited to 'modules/FindQt5Transitional.cmake')
-rw-r--r-- | modules/FindQt5Transitional.cmake | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/modules/FindQt5Transitional.cmake b/modules/FindQt5Transitional.cmake new file mode 100644 index 00000000..438e33d7 --- /dev/null +++ b/modules/FindQt5Transitional.cmake @@ -0,0 +1,43 @@ + +if (QT5_BUILD) + if (NOT Qt5Transitional_FIND_COMPONENTS) + foreach(_component + Core + Gui + DBus + DBusTools # For macros + Designer + Script + ScriptTools + Network + Test + Xml + Svg + Widgets + PrintSupport + ) + find_package(Qt5${_component}) + endforeach() + else() + foreach(_component ${Qt5Transitional_FIND_COMPONENTS}) + find_package(Qt5${_component} REQUIRED) + if ("${_component}" STREQUAL "Gui") + find_package(Qt5Widgets REQUIRED) + find_package(Qt5PrintSupport REQUIRED) + find_package(Qt5Svg REQUIRED) + find_package(Qt5Xml REQUIRED) + endif() + if ("${_component}" STREQUAL "DBus") + find_package(Qt5DBusTools REQUIRED) + endif() + endforeach() + endif() + include("${CMAKE_CURRENT_LIST_DIR}/ECMQt4To5Porting.cmake") # TODO: Port away from this. + include_directories(${QT_INCLUDES}) # TODO: Port away from this. +else() + foreach(_component ${Qt5Transitional_FIND_COMPONENTS}) + list(APPEND _components Qt${_component}) + endforeach() + find_package(Qt4 REQUIRED ${_components}) + include_directories(${QT_INCLUDES}) +endif() |