summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-28 16:03:13 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-28 16:03:13 (GMT)
commit2ac4cf6fb0bfa685ee961682ca7eda2b32039186 (patch)
tree4923e57c3e47b9a841208a968cb3181d39387548
parent0779aa8abcd32e3e34eed90fdaf97943aa33d23f (diff)
Fix setting the min Qt version + set also for non-Android builds to 5.3.0
* QT_REQUIRED_VERSION is not read by anything, find_package needs explicit parameter * REQUIRED_QT_VERSION as name seems more standard
-rw-r--r--CMakeLists.txt50
-rw-r--r--src/apps/behaim/CMakeLists.txt2
-rw-r--r--src/lib/marble/declarative/CMakeLists.txt2
-rw-r--r--src/plugins/designer/CMakeLists.txt2
-rw-r--r--src/plugins/positionprovider/CMakeLists.txt4
-rw-r--r--src/plugins/render/aprs/CMakeLists.txt2
6 files changed, 36 insertions, 26 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80b1f3b..c6f20ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,44 +65,54 @@ else()
option(BUILD_WITH_DBUS "Build the D-Bus interface for the Marble widget" ON)
endif()
+
#######################################################
# Specific options for building for different platforms
if(CMAKE_SYSTEM_NAME STREQUAL Android)
add_definitions(-DANDROID)
+endif()
+
+
+#######################################################
+# Find Qt dependencies
- # Minimum Qt version
- set(QT_REQUIRED_VERSION 5.3.0)
+# Minimum Qt version
+set(REQUIRED_QT_VERSION 5.3.0)
+if(CMAKE_SYSTEM_NAME STREQUAL Android)
+ # TODO: still needed with ECM toolchain?
SET(QT_QMAKE_EXECUTABLE "$ENV{Qt5_android}/bin/qmake")
+endif()
+
+find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Xml ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Network ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Test ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Script ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Svg ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Sql ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Concurrent ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Quick ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5PrintSupport ${REQUIRED_QT_VERSION} REQUIRED)
- find_package(Qt5Location REQUIRED)
- find_package(Qt5Positioning REQUIRED)
- find_package(Qt5Multimedia REQUIRED)
+if(CMAKE_SYSTEM_NAME STREQUAL Android)
+ find_package(Qt5Location ${REQUIRED_QT_VERSION} REQUIRED)
+ find_package(Qt5Positioning ${REQUIRED_QT_VERSION} REQUIRED)
+ find_package(Qt5Multimedia ${REQUIRED_QT_VERSION} REQUIRED)
set ( MARBLE_NO_WEBKITWIDGETS TRUE )
else()
- find_package(Qt5WebKit)
- find_package(Qt5WebKitWidgets)
+ find_package(Qt5WebKit ${REQUIRED_QT_VERSION})
+ find_package(Qt5WebKitWidgets ${REQUIRED_QT_VERSION})
if ( NOT Qt5WebKitWidgets_FOUND )
set ( MARBLE_NO_WEBKITWIDGETS TRUE )
endif()
endif()
-find_package(Qt5Core REQUIRED)
-find_package(Qt5Xml REQUIRED)
-find_package(Qt5Network REQUIRED)
-find_package(Qt5Test REQUIRED)
-find_package(Qt5Script REQUIRED)
-find_package(Qt5Widgets REQUIRED)
-find_package(Qt5Svg REQUIRED)
-find_package(Qt5Sql REQUIRED)
-find_package(Qt5Concurrent REQUIRED)
-find_package(Qt5Quick REQUIRED)
-find_package(Qt5PrintSupport REQUIRED)
-
if (BUILD_WITH_DBUS)
- find_package(Qt5DBus)
+ find_package(Qt5DBus ${REQUIRED_QT_VERSION})
if (NOT Qt5DBus_FOUND)
set(MARBLE_NO_DBUS TRUE)
endif()
diff --git a/src/apps/behaim/CMakeLists.txt b/src/apps/behaim/CMakeLists.txt
index 5cef1e8..1a0149b 100644
--- a/src/apps/behaim/CMakeLists.txt
+++ b/src/apps/behaim/CMakeLists.txt
@@ -6,7 +6,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
if (CMAKE_SYSTEM_NAME STREQUAL Android)
set(TARGET MarbleBehaim)
- find_package(Qt5AndroidExtras)
+ find_package(Qt5AndroidExtras ${REQUIRED_QT_VERSION})
add_library (${TARGET} SHARED ${marble_SRCS} ${marble_QRCS})
diff --git a/src/lib/marble/declarative/CMakeLists.txt b/src/lib/marble/declarative/CMakeLists.txt
index 9d8b4a6..73d52d5 100644
--- a/src/lib/marble/declarative/CMakeLists.txt
+++ b/src/lib/marble/declarative/CMakeLists.txt
@@ -1,6 +1,6 @@
PROJECT( MarbleDeclarativePlugin )
-macro_optional_find_package(Qt5Positioning)
+macro_optional_find_package(Qt5Positioning ${REQUIRED_QT_VERSION})
if(Qt5Positioning_FOUND)
add_definitions(-DHAVE_QT5_POSITIONING)
endif(Qt5Positioning_FOUND)
diff --git a/src/plugins/designer/CMakeLists.txt b/src/plugins/designer/CMakeLists.txt
index f4cc970..b421e5b 100644
--- a/src/plugins/designer/CMakeLists.txt
+++ b/src/plugins/designer/CMakeLists.txt
@@ -1,7 +1,7 @@
if (WITH_DESIGNER_PLUGIN)
# TODO: find why this is not listed in the feature_summary (same with Qt5UiPlugin)
- find_package(Qt5Designer QUIET)
+ find_package(Qt5Designer ${REQUIRED_QT_VERSION} QUIET)
marble_set_package_properties( Qt5Designer PROPERTIES TYPE OPTIONAL PURPOSE "Required to build Qt Designer plugins" )
if(NOT Qt5Designer_VERSION_STRING VERSION_LESS 5.5.0)
diff --git a/src/plugins/positionprovider/CMakeLists.txt b/src/plugins/positionprovider/CMakeLists.txt
index dd4537a..26e4fe3 100644
--- a/src/plugins/positionprovider/CMakeLists.txt
+++ b/src/plugins/positionprovider/CMakeLists.txt
@@ -8,8 +8,8 @@ IF(LIBGPS_FOUND)
ADD_SUBDIRECTORY( gpsd )
ENDIF(LIBGPS_FOUND)
-macro_optional_find_package(Qt5Location)
-macro_optional_find_package(Qt5Positioning)
+macro_optional_find_package(Qt5Location ${REQUIRED_QT_VERSION})
+macro_optional_find_package(Qt5Positioning ${REQUIRED_QT_VERSION})
marble_set_package_properties( Qt5Positioning PROPERTIES DESCRIPTION "a collection of APIs and frameworks" )
marble_set_package_properties( Qt5Positioning PROPERTIES URL "http://qt.digia.com/" )
marble_set_package_properties( Qt5Positioning PROPERTIES TYPE OPTIONAL PURPOSE "Required for QtLocation to work" )
diff --git a/src/plugins/render/aprs/CMakeLists.txt b/src/plugins/render/aprs/CMakeLists.txt
index b1d77b6..ec932e7 100644
--- a/src/plugins/render/aprs/CMakeLists.txt
+++ b/src/plugins/render/aprs/CMakeLists.txt
@@ -1,6 +1,6 @@
PROJECT(AprsPlugin)
-macro_optional_find_package(Qt5SerialPort)
+macro_optional_find_package(Qt5SerialPort ${REQUIRED_QT_VERSION})
marble_set_package_properties( Qt5SerialPort PROPERTIES DESCRIPTION "Provides access to hardware and virtual serial ports." )
marble_set_package_properties( Qt5SerialPort PROPERTIES TYPE OPTIONAL PURPOSE "Reading from serial port in APRS plugin" )