summaryrefslogtreecommitdiff
path: root/platform/macos/config.cmake
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-09-25 21:35:04 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-09-28 13:48:36 -0400
commit64c75b442c4d387e4867757abf49462c561e5955 (patch)
tree63f572961f6309a851d2e85ebe191e6a3cb7e5ab /platform/macos/config.cmake
parentd73e33eb62858b91212314d97bfe9cf49e857141 (diff)
downloadqtlocation-mapboxgl-64c75b442c4d387e4867757abf49462c561e5955.tar.gz
[build] split out DefaultFileSource and dependents to a separate target
We don't want to link it into the node bindings, so keep it in a separate target
Diffstat (limited to 'platform/macos/config.cmake')
-rw-r--r--platform/macos/config.cmake47
1 files changed, 28 insertions, 19 deletions
diff --git a/platform/macos/config.cmake b/platform/macos/config.cmake
index bb2cc9ac1c..aca99f9b40 100644
--- a/platform/macos/config.cmake
+++ b/platform/macos/config.cmake
@@ -6,29 +6,11 @@ mason_use(gtest VERSION 1.8.0)
mason_use(benchmark VERSION 1.2.0)
mason_use(icu VERSION 58.1-min-size)
+include(cmake/loop-uv.cmake)
include(cmake/loop-darwin.cmake)
macro(mbgl_platform_core)
target_sources(mbgl-core
- # File source
- PRIVATE platform/darwin/src/http_file_source.mm
- PRIVATE platform/default/asset_file_source.cpp
- PRIVATE platform/default/default_file_source.cpp
- PRIVATE platform/default/local_file_source.cpp
- PRIVATE platform/default/online_file_source.cpp
-
- # Default styles
- PRIVATE platform/default/mbgl/util/default_styles.hpp
-
- # Offline
- PRIVATE platform/default/mbgl/storage/offline.cpp
- PRIVATE platform/default/mbgl/storage/offline_database.cpp
- PRIVATE platform/default/mbgl/storage/offline_database.hpp
- PRIVATE platform/default/mbgl/storage/offline_download.cpp
- PRIVATE platform/default/mbgl/storage/offline_download.hpp
- PRIVATE platform/default/sqlite3.cpp
- PRIVATE platform/default/sqlite3.hpp
-
# Misc
PRIVATE platform/darwin/mbgl/storage/reachability.h
PRIVATE platform/darwin/mbgl/storage/reachability.m
@@ -86,23 +68,47 @@ macro(mbgl_platform_core)
PUBLIC "-framework ImageIO"
PUBLIC "-framework CoreServices"
PUBLIC "-framework SystemConfiguration"
+ )
+endmacro()
+
+
+macro(mbgl_filesource)
+ target_sources(mbgl-filesource
+ # File source
+ PRIVATE platform/darwin/src/http_file_source.mm
+
+ # Database
+ PRIVATE platform/default/sqlite3.cpp
+ )
+
+ target_compile_options(mbgl-filesource
+ PRIVATE -fobjc-arc
+ PRIVATE -fvisibility=hidden
+ )
+
+ target_link_libraries(mbgl-filesource
PUBLIC "-lsqlite3"
+ PUBLIC "-framework Foundation"
)
endmacro()
macro(mbgl_platform_glfw)
target_link_libraries(mbgl-glfw
+ PRIVATE mbgl-filesource
PRIVATE mbgl-loop-darwin
)
+
target_compile_options(mbgl-glfw
PRIVATE -fvisibility=hidden
)
+
endmacro()
macro(mbgl_platform_render)
target_link_libraries(mbgl-render
+ PRIVATE mbgl-filesource
PRIVATE mbgl-loop-darwin
)
target_compile_options(mbgl-render
@@ -113,6 +119,7 @@ endmacro()
macro(mbgl_platform_offline)
target_link_libraries(mbgl-offline
+ PRIVATE mbgl-filesource
PRIVATE mbgl-loop-darwin
)
target_compile_options(mbgl-offline
@@ -137,6 +144,7 @@ macro(mbgl_platform_test)
)
target_link_libraries(mbgl-test
+ PRIVATE mbgl-filesource
PRIVATE mbgl-loop-darwin
)
endmacro()
@@ -157,6 +165,7 @@ macro(mbgl_platform_benchmark)
)
target_link_libraries(mbgl-benchmark
+ PRIVATE mbgl-filesource
PRIVATE mbgl-loop-darwin
)
endmacro()