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)
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}
18 if (QML_DESKTOP_COMPONENTS_PATH)
19 message(SYSTEM " Qml Desktop Components found")
20 set(QML_DESKTOP_COMPONENTS ON)
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)