summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStefan Wildemann <metalstrolch@metalstrolche.de>2015-11-21 17:21:04 +0100
committerStefan Wildemann <gta04@metalstrolche.de>2017-02-23 19:40:26 +0100
commit8efae9e743b97d520ffc80afdf20785ac07ea9b5 (patch)
treec8f0cb143c51e1932310f6092d015f851159e93e /CMakeLists.txt
parent0ba8f875914f91dae76d83feaa37afdaf72c49a7 (diff)
downloadnavit-8efae9e743b97d520ffc80afdf20785ac07ea9b5.tar.gz
Add QT5 graphics. Works on Sailfish OS.
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt22
1 files changed, 17 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 926fcb8b2..a240b6630 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,6 +87,7 @@ add_module(graphics/opengl "FreeType library not found" FALSE)
add_module(graphics/sdl "Required library not found" FALSE)
add_module(graphics/egl "Required library not found" FALSE)
add_module(graphics/qt_qpainter "Qt libraries not found" FALSE)
+add_module(graphics/qt5 "Qt5 libraries not found" FALSE)
add_module(gui/qml "Qt Declarative not found" FALSE)
add_module(gui/gtk "GTK libs not found" FALSE)
add_module(vehicle/gpsd "gpsd lib not found" FALSE)
@@ -155,11 +156,18 @@ find_package(Threads)
libfind_pkg_check_modules(FONTCONFIG fontconfig)
#Qt detection
if (NOT DISABLE_QT)
- # Unfortunately, CMake seems to ignore the "OPTIONAL_COMPONENTS" flag,
- # and actually requires all components to be installed. Maybe this can
- # be fixed later...
- find_package(Qt4 4.7 COMPONENTS QtCore OPTIONAL_COMPONENTS QtGui QtXml QtDeclarative QtSvg)
+ find_package(Qt5Widgets)
+ find_package(Qt5Svg)
+ #find_package(Qt5Declarative)
+ if (Qt5Widgets_FOUND)
+ else (Qt5Widgets_FOUND)
+ # Unfortunately, CMake seems to ignore the "OPTIONAL_COMPONENTS" flag,
+ # and actually requires all components to be installed. Maybe this can
+ # be fixed later...
+ find_package(Qt4 4.7 COMPONENTS QtCore OPTIONAL_COMPONENTS QtGui QtXml QtDeclarative QtSvg)
+ endif (Qt5Widgets_FOUND)
endif (NOT DISABLE_QT)
+
#pkg-config based detection
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
@@ -301,7 +309,11 @@ if (QT_FOUND)
endif()
endif()
endif(QT_FOUND)
-
+if (Qt5Widgets_FOUND)
+ set_with_reason(graphics/qt5 "Qt5 found" TRUE ${Qt5Widgets_LIBRARIES}
+ ${Qt5Declarative_LIBRARIES}
+ ${Qt5Svg_LIBRARIES})
+endif ()
if(GTK2_FOUND)
# Include gtk.h with "SYSTEM" to avoid GCC compiler warning for gtkitemfactory.h.
include_directories(SYSTEM ${GTK2_GTK_INCLUDE_DIR})