From 69960afb8db0444ec11cb46b47e877cc34f61fc7 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Wed, 24 Oct 2018 01:53:22 +0300 Subject: [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. --- platform/android/config.cmake | 5 ----- platform/ios/config.cmake | 5 ----- platform/linux/config.cmake | 3 --- platform/macos/config.cmake | 5 ----- platform/qt/config.cmake | 20 ++------------------ platform/qt/qt.cmake | 2 -- 6 files changed, 2 insertions(+), 38 deletions(-) (limited to 'platform') 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 " cruT ") @@ -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 -- cgit v1.2.1