summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2e59789d..ad951071 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,8 +80,7 @@ libfind_pkg_check_modules(FONTCONFIG fontconfig)
#Qt detection
SET(QT_USE_QTSVG TRUE)
SET(QT_USE_QTXML TRUE)
-SET(QT_USE_QTDECLARATIVE TRUE)
-find_package(Qt4 COMPONENTS QtCore QtGui QtXml QtDeclarative QtSvg OPTIONAL)
+find_package(Qt4 COMPONENTS QtCore QtGui QtXml QtSvg OPTIONAL)
#pkg-config based detection
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
@@ -91,6 +90,7 @@ if(PKG_CONFIG_FOUND)
pkg_check_modules(LIBOSSO libosso)
pkg_check_modules(LIBGPS19 libgps>=2.90)
pkg_check_modules(LIBGARMIN libgarmin)
+ pkg_check_modules(QTDECLARATIVE QtDeclarative)
endif(PKG_CONFIG_FOUND)
#Simple checks
CHECK_INCLUDE_FILES(wordexp.h HAVE_WORDEXP)
@@ -190,8 +190,9 @@ if (QT_FOUND)
include(${QT_USE_FILE})
set_with_reason(graphics/qt_qpainter "Qt libraries found" TRUE ${QT_LIBRARIES})
- if (QT_QTDECLARATIVE_FOUND AND QT_QTXML_FOUND)
- set_with_reason(gui/qml "Qt Declarative found" TRUE ${QT_LIBRARIES})
+ if (QTDECLARATIVE_FOUND AND QT_QTXML_FOUND)
+ include_directories(${QTDECLARATIVE_INCLUDE_DIRS})
+ set_with_reason(gui/qml "Qt Declarative found" TRUE ${QTDECLARATIVE_LIBRARIES})
endif()
if (QT_QTSVG_FOUND)