summaryrefslogtreecommitdiff
path: root/cmake/filesource.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 /cmake/filesource.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 'cmake/filesource.cmake')
-rw-r--r--cmake/filesource.cmake57
1 files changed, 57 insertions, 0 deletions
diff --git a/cmake/filesource.cmake b/cmake/filesource.cmake
new file mode 100644
index 0000000000..bb1b4e8c05
--- /dev/null
+++ b/cmake/filesource.cmake
@@ -0,0 +1,57 @@
+add_library(mbgl-filesource STATIC
+ # File source
+ include/mbgl/storage/default_file_source.hpp
+ platform/default/default_file_source.cpp
+ platform/default/mbgl/storage/file_source_request.hpp
+ platform/default/file_source_request.cpp
+ include/mbgl/storage/online_file_source.hpp
+ platform/default/online_file_source.cpp
+ src/mbgl/storage/http_file_source.hpp
+ src/mbgl/storage/asset_file_source.hpp
+ platform/default/asset_file_source.cpp
+ src/mbgl/storage/local_file_source.hpp
+ platform/default/local_file_source.cpp
+
+ # Offline
+ include/mbgl/storage/offline.hpp
+ platform/default/mbgl/storage/offline.cpp
+ platform/default/mbgl/storage/offline_database.hpp
+ platform/default/mbgl/storage/offline_database.cpp
+ platform/default/mbgl/storage/offline_download.hpp
+ platform/default/mbgl/storage/offline_download.cpp
+
+ # Database
+ platform/default/sqlite3.hpp
+)
+
+target_add_mason_package(mbgl-filesource PUBLIC geometry)
+target_add_mason_package(mbgl-filesource PUBLIC variant)
+target_add_mason_package(mbgl-filesource PUBLIC any)
+target_add_mason_package(mbgl-filesource PRIVATE rapidjson)
+target_add_mason_package(mbgl-filesource PRIVATE boost)
+target_add_mason_package(mbgl-filesource PRIVATE geojson)
+
+set_xcode_property(mbgl-filesource GCC_SYMBOLS_PRIVATE_EXTERN YES)
+
+target_compile_options(mbgl-filesource
+ PRIVATE -fPIC
+ PRIVATE -fvisibility-inlines-hidden
+)
+
+target_include_directories(mbgl-filesource
+ PRIVATE include
+ PRIVATE src
+ PRIVATE platform/default
+)
+
+target_link_libraries(mbgl-filesource
+ PUBLIC mbgl-core
+)
+
+mbgl_filesource()
+
+create_source_groups(mbgl-filesource)
+
+xcode_create_scheme(TARGET mbgl-filesource)
+
+initialize_xcode_cxx_build_settings(mbgl-filesource)