diff options
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 926fcb8b2..819e7d450 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) @@ -98,6 +99,7 @@ add_module(binding/python "python libraries not found" FALSE) add_module(speech/dbus "dbus-glib-1 not found" FALSE) add_module(speech/cmdline "neither system() nor CreateProcess() found" FALSE) add_module(vehicle/gpsd_dbus "dbus-glib-1 not found" FALSE) +add_module(vehicle/qt5 "Qt5 libraries not found" FALSE) add_module(speech/speech_dispatcher "speech_dispatcher lib not found" FALSE) add_module(autoload/osso "Default" FALSE) add_module(map/garmin "Garmin library not found" FALSE) @@ -155,11 +157,21 @@ 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(Qt5DBus) + find_package(Qt5Positioning) + find_package(Qt5Sensors) + #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 +313,17 @@ 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} + ${Qt5DBus_LIBRARIES}) +endif () +if (Qt5Positioning_FOUND) + set_with_reason(vehicle/qt5 "Qt5 Positioning found" TRUE + ${Qt5Positioning_LIBRARIES} + ${Qt5Sensors_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}) |