summaryrefslogtreecommitdiff
path: root/platform/macos/config.cmake
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-11-20 22:39:52 +0100
committerJohn Firebaugh <john.firebaugh@gmail.com>2018-08-27 14:07:40 -0700
commit1e454642c8bc99698d25105fe0034916e2930fe6 (patch)
tree3d9b60c1366033c97dfe51d4285d6bf3edf992ed /platform/macos/config.cmake
parentfd1ed8ce48fc9eaf6793e852381d8c7e648386af (diff)
downloadqtlocation-mapboxgl-1e454642c8bc99698d25105fe0034916e2930fe6.tar.gz
[build] allow WITH_EGL for macOS as well (SwiftShader) and enable EGL for GLFW
Diffstat (limited to 'platform/macos/config.cmake')
-rw-r--r--platform/macos/config.cmake16
1 files changed, 14 insertions, 2 deletions
diff --git a/platform/macos/config.cmake b/platform/macos/config.cmake
index d53f61f3b3..f164b8491e 100644
--- a/platform/macos/config.cmake
+++ b/platform/macos/config.cmake
@@ -27,7 +27,6 @@ macro(mbgl_platform_core)
PRIVATE platform/default/mbgl/gl/headless_frontend.hpp
PRIVATE platform/default/mbgl/gl/headless_backend.cpp
PRIVATE platform/default/mbgl/gl/headless_backend.hpp
- PRIVATE platform/darwin/src/headless_backend_cgl.cpp
# Snapshotting
PRIVATE platform/default/mbgl/map/map_snapshotter.cpp
@@ -40,6 +39,20 @@ macro(mbgl_platform_core)
PRIVATE platform/default/mbgl/util/default_thread_pool.cpp
)
+ if(WITH_EGL)
+ target_sources(mbgl-core
+ PRIVATE platform/linux/src/headless_backend_egl.cpp
+ )
+ target_add_mason_package(mbgl-core PUBLIC swiftshader)
+ else()
+ target_sources(mbgl-core
+ PRIVATE platform/darwin/src/headless_backend_cgl.cpp
+ )
+ target_link_libraries(mbgl-core
+ PUBLIC "-framework OpenGL"
+ )
+ endif()
+
target_add_mason_package(mbgl-core PUBLIC geojson)
target_add_mason_package(mbgl-core PUBLIC polylabel)
target_add_mason_package(mbgl-core PRIVATE icu)
@@ -58,7 +71,6 @@ macro(mbgl_platform_core)
PUBLIC "-framework Foundation"
PUBLIC "-framework CoreText"
PUBLIC "-framework CoreGraphics"
- PUBLIC "-framework OpenGL"
PUBLIC "-framework ImageIO"
PUBLIC "-framework CoreServices"
PUBLIC "-framework SystemConfiguration"