summaryrefslogtreecommitdiff
path: root/platform/qt/qt.cmake
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2017-10-19 16:02:25 -0700
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2017-10-25 18:08:28 +0300
commitf7426a4253e2157ee5e98d86afde9cd293a25b5b (patch)
tree34e67978d1ee2560720388343abc476526b8cae7 /platform/qt/qt.cmake
parent9d87dc8cf17f00eb6a8aadc0612972d63dd7f6e3 (diff)
downloadqtlocation-mapboxgl-f7426a4253e2157ee5e98d86afde9cd293a25b5b.tar.gz
[Qt] Use QOpenGLFunctions for Qt5
Do not link directly with OpenGL, so we load it using Qt5. Also, always build for OpenGL ES2 which is the compatibilty mode that should work on all platforms supported by Qt5.
Diffstat (limited to 'platform/qt/qt.cmake')
-rw-r--r--platform/qt/qt.cmake20
1 files changed, 10 insertions, 10 deletions
diff --git a/platform/qt/qt.cmake b/platform/qt/qt.cmake
index a7862c3936..f832dd593c 100644
--- a/platform/qt/qt.cmake
+++ b/platform/qt/qt.cmake
@@ -106,12 +106,6 @@ endif()
xcode_create_scheme(TARGET mbgl-qt)
-if(WITH_QT_4)
- include(platform/qt/qt4.cmake)
-else()
- include(platform/qt/qt5.cmake)
-endif()
-
# OS specific configurations
if (MASON_PLATFORM STREQUAL "osx" OR MASON_PLATFORM STREQUAL "ios")
list(APPEND MBGL_QT_CORE_FILES
@@ -119,15 +113,21 @@ if (MASON_PLATFORM STREQUAL "osx" OR MASON_PLATFORM STREQUAL "ios")
)
list(APPEND MBGL_QT_CORE_LIBRARIES
PRIVATE "-framework Foundation"
- PRIVATE "-framework OpenGL"
)
+ if(WITH_QT_4)
+ list(APPEND MBGL_QT_CORE_LIBRARIES
+ PRIVATE "-framework OpenGL"
+ )
+ endif()
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
list(APPEND MBGL_QT_CORE_FILES
PRIVATE platform/default/thread.cpp
)
- list(APPEND MBGL_QT_CORE_LIBRARIES
- PRIVATE -lGL
- )
+ if(WITH_QT_4)
+ list(APPEND MBGL_QT_CORE_LIBRARIES
+ PRIVATE "-lGL"
+ )
+ endif()
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
list(APPEND MBGL_QT_CORE_FILES
PRIVATE platform/qt/src/thread.cpp