summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-08-01 17:26:49 +0300
committerKonstantin Käfer <mail@kkaefer.com>2016-08-05 11:42:22 +0200
commit75ca6d9bdd836fc9820e14da52c6da7a98dc04cf (patch)
treed0c40b5008713643bffbc57ebd25e795abb213ac
parent95b6d48b710a38b7969b72b6d2a89f3930fdbc0f (diff)
downloadqtlocation-mapboxgl-75ca6d9bdd836fc9820e14da52c6da7a98dc04cf.tar.gz
[build] Workaround automoc issue on some cmake versions
-rw-r--r--platform/qt/qt.cmake8
-rw-r--r--platform/qt/qt4.cmake2
-rw-r--r--platform/qt/qt5.cmake2
3 files changed, 4 insertions, 8 deletions
diff --git a/platform/qt/qt.cmake b/platform/qt/qt.cmake
index 2d3ec58ad9..9033bcfe37 100644
--- a/platform/qt/qt.cmake
+++ b/platform/qt/qt.cmake
@@ -1,11 +1,6 @@
# This file is to be reused by target platforms that don't
# support `mason` (i.e. Yocto). Do not add any `mason` macro.
-if (CMAKE_VERSION VERSION_EQUAL "3.6.0")
- # CMake 3.6.0 is buggy: https://gitlab.kitware.com/cmake/cmake/issues/16209
- message(FATAL_ERROR "CMake 3.6.0 is not supported due to a bug in automoc name generation. Please upgrade or downgrade.")
-endif()
-
option(WITH_QT_DECODERS "Use builtin Qt image decoders" OFF)
option(WITH_QT_4 "Use Qt4 instead of Qt5" OFF)
@@ -55,9 +50,6 @@ set(MBGL_QT_FILES
PRIVATE platform/qt/src/timer.cpp
PRIVATE platform/qt/src/timer_impl.hpp
- # Qt resources
- PRIVATE platform/qt/qmapbox.qrc
-
# Public headers
PRIVATE platform/qt/include/qmapbox.hpp
PRIVATE platform/qt/include/qmapboxgl.hpp
diff --git a/platform/qt/qt4.cmake b/platform/qt/qt4.cmake
index 25e6158bc2..451edbc15b 100644
--- a/platform/qt/qt4.cmake
+++ b/platform/qt/qt4.cmake
@@ -1,5 +1,7 @@
find_package(Qt4 REQUIRED)
+QT4_ADD_RESOURCES(MBGL_QT_FILES platform/qt/qmapbox.qrc)
+
set(MBGL_QT_LIBRARIES
PRIVATE Qt4::QtCore
PRIVATE Qt4::QtGui
diff --git a/platform/qt/qt5.cmake b/platform/qt/qt5.cmake
index a04d08ce86..f19c02aec7 100644
--- a/platform/qt/qt5.cmake
+++ b/platform/qt/qt5.cmake
@@ -6,6 +6,8 @@ find_package(Qt5OpenGL REQUIRED)
find_package(Qt5Quick REQUIRED)
find_package(Qt5Widgets REQUIRED)
+QT5_ADD_RESOURCES(MBGL_QT_FILES platform/qt/qmapbox.qrc)
+
set(MBGL_QT_LIBRARIES
PRIVATE Qt5::Core
PRIVATE Qt5::Gui