add some comments
[makneto-zunavac1.git] / CMakeMod / FindQmlDesktopComponents.cmake
blobd16bdb061a155381f24383969b95abc235631575
1 ## this is a simple script that try find Qml Desktop Components
2 ## in Qml is used "import QtDesktop 0.1"
4 ## source codes at: http://qt.gitorious.org/qt-components/desktop
6 # Find dependencies, if not already found
7 if (NOT DEFINED QT_INCLUDE_DIR)
8         message(STATUS "Qt hasn't been found yet. Looking...")
9         find_package(Qt4 COMPONENTS QtCore QtGui QtDeclarative REQUIRED)
10 endif()
12 if (QT_QTDECLARATIVE_FOUND AND ${QTVERSION} VERSION_GREATER 4.7.2)
13         #message(SYSTEM " QT_IMPORTS_DIR: ${QT_IMPORTS_DIR}")
14         find_path(QML_DESKTOP_COMPONENTS_PATH QtDesktop
15                         PATHS ${QT_IMPORTS_DIR}
16                         NO_DEFAULT_PATH)
18         if (QML_DESKTOP_COMPONENTS_PATH)
19                 message(SYSTEM " Qml Desktop Components found")
20                 set(QML_DESKTOP_COMPONENTS ON)
21         else()
22                 IF (QmlDesktopComponents_FIND_REQUIRED)
23                         message(SEND_ERROR "Qml Desktop Components not found! Its sources are at http://qt.gitorious.org/qt-components/desktop")
24                 ELSE (QmlDesktopComponents_FIND_REQUIRED)
25                         message(STATUS "Qml Desktop Components not found! Its sources are at http://qt.gitorious.org/qt-components/desktop")
26                 ENDIF(QmlDesktopComponents_FIND_REQUIRED)
27     endif()
28 endif()