summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2018-10-24 01:53:22 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2018-10-31 18:19:28 +0200
commit69960afb8db0444ec11cb46b47e877cc34f61fc7 (patch)
tree37bcc19f033aadd8c3c158fad02b8c5e4a9437ed /platform
parent3a3c05bd8aeabf179084bd9a0137edd2abf41e4c (diff)
downloadqtlocation-mapboxgl-69960afb8db0444ec11cb46b47e877cc34f61fc7.tar.gz
[build] Add build system for submodules
Vendorize the submodules and a simple CMake build system for all them. The dependencies will inherit compilation options for core. The goal is to make Mapbox GL Core completely self contained with a simple offline build.
Diffstat (limited to 'platform')
-rw-r--r--platform/android/config.cmake5
-rw-r--r--platform/ios/config.cmake5
-rw-r--r--platform/linux/config.cmake3
-rw-r--r--platform/macos/config.cmake5
-rw-r--r--platform/qt/config.cmake20
-rw-r--r--platform/qt/qt.cmake2
6 files changed, 2 insertions, 38 deletions
diff --git a/platform/android/config.cmake b/platform/android/config.cmake
index ec64b239f8..0e10e2af10 100644
--- a/platform/android/config.cmake
+++ b/platform/android/config.cmake
@@ -1,7 +1,6 @@
set(USE_GLES2 ON)
include(cmake/sqlite.cmake)
-include(cmake/icu.cmake)
# Build thin archives.
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cruT <TARGET> <LINK_FLAGS> <OBJECTS>")
@@ -43,13 +42,9 @@ macro(mbgl_platform_core)
PRIVATE platform/android
)
- target_add_mason_package(mbgl-core PUBLIC geojson)
target_add_mason_package(mbgl-core PUBLIC jni.hpp)
- target_add_mason_package(mbgl-core PUBLIC rapidjson)
target_link_libraries(mbgl-core
- PRIVATE icu
- PUBLIC expected
PUBLIC -llog
PUBLIC -landroid
PUBLIC -ljnigraphics
diff --git a/platform/ios/config.cmake b/platform/ios/config.cmake
index 471c1183a5..320ef7e73b 100644
--- a/platform/ios/config.cmake
+++ b/platform/ios/config.cmake
@@ -12,7 +12,6 @@ macro(initialize_ios_target target)
endmacro()
-include(cmake/icu.cmake)
include(cmake/loop-darwin.cmake)
initialize_ios_target(icu)
initialize_ios_target(mbgl-loop-darwin)
@@ -61,16 +60,12 @@ macro(mbgl_platform_core)
PRIVATE platform/default/mbgl/util/default_thread_pool.cpp
)
- target_add_mason_package(mbgl-core PUBLIC geojson)
- target_add_mason_package(mbgl-core PUBLIC polylabel)
-
target_include_directories(mbgl-core
PUBLIC platform/darwin
PUBLIC platform/default
)
target_link_libraries(mbgl-core
- PRIVATE icu
PUBLIC "-lz"
PUBLIC "-framework Foundation"
PUBLIC "-framework CoreText"
diff --git a/platform/linux/config.cmake b/platform/linux/config.cmake
index a81f5d65ad..cfbf4ef8a2 100644
--- a/platform/linux/config.cmake
+++ b/platform/linux/config.cmake
@@ -1,6 +1,4 @@
-include(cmake/nunicode.cmake)
include(cmake/sqlite.cmake)
-include(cmake/icu.cmake)
add_library(mbgl-loop-uv STATIC
platform/default/async_task.cpp
@@ -84,7 +82,6 @@ macro(mbgl_platform_core)
target_add_mason_package(mbgl-core PUBLIC libpng)
target_add_mason_package(mbgl-core PUBLIC libjpeg-turbo)
- target_add_mason_package(mbgl-core PUBLIC geojson)
target_link_libraries(mbgl-core
PRIVATE nunicode
diff --git a/platform/macos/config.cmake b/platform/macos/config.cmake
index 1fb09e066e..3b5b2a8529 100644
--- a/platform/macos/config.cmake
+++ b/platform/macos/config.cmake
@@ -1,6 +1,5 @@
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11)
-include(cmake/icu.cmake)
include(cmake/loop-darwin.cmake)
macro(mbgl_platform_core)
@@ -54,9 +53,6 @@ macro(mbgl_platform_core)
)
endif()
- target_add_mason_package(mbgl-core PUBLIC geojson)
- target_add_mason_package(mbgl-core PUBLIC polylabel)
-
target_compile_options(mbgl-core
PRIVATE -fobjc-arc
)
@@ -67,7 +63,6 @@ macro(mbgl_platform_core)
)
target_link_libraries(mbgl-core
- PRIVATE icu
PUBLIC "-lz"
PUBLIC "-framework Foundation"
PUBLIC "-framework CoreText"
diff --git a/platform/qt/config.cmake b/platform/qt/config.cmake
index 9f7ee24cfb..a2c6b0a9e9 100644
--- a/platform/qt/config.cmake
+++ b/platform/qt/config.cmake
@@ -1,9 +1,4 @@
include(platform/qt/qt.cmake)
-include(cmake/nunicode.cmake)
-
-if(NOT WITH_QT_I18N)
- include(cmake/icu.cmake)
-endif()
macro(mbgl_platform_core)
target_sources(mbgl-core
@@ -16,9 +11,9 @@ macro(mbgl_platform_core)
PRIVATE platform/qt/include
)
- target_link_libraries(mbgl-core
+ target_link_libraries(mbgl-core PRIVATE
${MBGL_QT_CORE_LIBRARIES}
- PRIVATE nunicode
+ nunicode
)
if(NOT WITH_QT_DECODERS)
@@ -39,10 +34,6 @@ macro(mbgl_platform_core)
else()
target_sources(mbgl-core PRIVATE platform/qt/src/bidi.cpp)
endif()
-
- if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
- target_add_mason_package(mbgl-core PRIVATE optional)
- endif()
endmacro()
@@ -54,10 +45,6 @@ macro(mbgl_filesource)
target_link_libraries(mbgl-filesource
${MBGL_QT_FILESOURCE_LIBRARIES}
)
-
- if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
- target_add_mason_package(mbgl-filesource PRIVATE optional)
- endif()
endmacro()
# FIXME: For now tests are disabled on Windows until we
@@ -86,6 +73,3 @@ if (NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
)
endmacro()
endif()
-
-target_add_mason_package(qmapboxgl PRIVATE geojson)
-target_add_mason_package(qmapboxgl PRIVATE rapidjson)
diff --git a/platform/qt/qt.cmake b/platform/qt/qt.cmake
index 323c616a64..4e781866e6 100644
--- a/platform/qt/qt.cmake
+++ b/platform/qt/qt.cmake
@@ -158,8 +158,6 @@ elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
list(APPEND MBGL_QT_CORE_FILES
PRIVATE platform/qt/src/thread.cpp
)
-
- target_add_mason_package(qmapboxgl PRIVATE optional)
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "QNX")
list(APPEND MBGL_QT_CORE_FILES
PRIVATE platform/qt/src/thread.cpp