diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2017-03-03 14:31:46 -0800 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-03-03 17:28:07 -0800 |
commit | f6cd017f58f0e31d51c7e877b43aca3fc50d1866 (patch) | |
tree | 0d052e1574e26b5e64c5d695af3c8f1bbe5a4555 /platform/qt | |
parent | a5f6ee696367e3311334faa03fb55e215174997f (diff) | |
download | qtlocation-mapboxgl-f6cd017f58f0e31d51c7e877b43aca3fc50d1866.tar.gz |
[Qt] Remove legacy QOpenGL dependency from Qt5 build
OpenGL on Qt5 is offered via QtGui.
Diffstat (limited to 'platform/qt')
-rw-r--r-- | platform/qt/config.cmake | 2 | ||||
-rw-r--r-- | platform/qt/qt4.cmake | 5 | ||||
-rw-r--r-- | platform/qt/qt5.cmake | 9 | ||||
-rw-r--r-- | platform/qt/test/headless_backend_qt.cpp | 3 |
4 files changed, 15 insertions, 4 deletions
diff --git a/platform/qt/config.cmake b/platform/qt/config.cmake index e97c6b340a..4563f03a9b 100644 --- a/platform/qt/config.cmake +++ b/platform/qt/config.cmake @@ -72,7 +72,7 @@ macro(mbgl_platform_test) target_link_libraries(mbgl-test PRIVATE qmapboxgl - ${MBGL_QT_LIBRARIES} + ${MBGL_QT_TEST_LIBRARIES} ) endmacro() diff --git a/platform/qt/qt4.cmake b/platform/qt/qt4.cmake index d6d7d89417..80fd4f00d3 100644 --- a/platform/qt/qt4.cmake +++ b/platform/qt/qt4.cmake @@ -8,6 +8,11 @@ set(MBGL_QT_LIBRARIES PRIVATE Qt4::QtSql ) +set(MBGL_QT_TEST_LIBRARIES + PRIVATE Qt4::QtCore + PRIVATE Qt4::QtOpenGL +) + target_link_libraries(qmapboxgl PRIVATE mbgl-core PRIVATE Qt4::QtCore diff --git a/platform/qt/qt5.cmake b/platform/qt/qt5.cmake index 7210a3d5f5..9a482f6d30 100644 --- a/platform/qt/qt5.cmake +++ b/platform/qt/qt5.cmake @@ -11,10 +11,16 @@ set(MBGL_QT_LIBRARIES PRIVATE Qt5::Core PRIVATE Qt5::Gui PRIVATE Qt5::Network - PRIVATE Qt5::OpenGL PRIVATE Qt5::Sql ) +set(MBGL_QT_TEST_LIBRARIES + PRIVATE Qt5::Core + PRIVATE Qt5::Gui + PRIVATE Qt5::Widgets + PRIVATE Qt5::OpenGL +) + target_sources(qmapboxgl PRIVATE platform/qt/include/qquickmapboxgl.hpp PRIVATE platform/qt/include/qquickmapboxglmapparameter.hpp @@ -29,7 +35,6 @@ target_link_libraries(qmapboxgl PRIVATE Qt5::Core PRIVATE Qt5::Gui PRIVATE Qt5::Location - PRIVATE Qt5::OpenGL PRIVATE Qt5::Quick PRIVATE Qt5::Sql ) diff --git a/platform/qt/test/headless_backend_qt.cpp b/platform/qt/test/headless_backend_qt.cpp index 00b519d5bf..401ce55a7f 100644 --- a/platform/qt/test/headless_backend_qt.cpp +++ b/platform/qt/test/headless_backend_qt.cpp @@ -1,10 +1,11 @@ #include <mbgl/gl/headless_backend.hpp> -#include <QGLContext> #include <QGLWidget> #if QT_VERSION >= 0x050000 #include <QOpenGLContext> +#else +#include <QGLContext> #endif #include <cassert> |