diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/benchmark.cmake | 4 | ||||
-rw-r--r-- | cmake/core.cmake | 39 | ||||
-rw-r--r-- | cmake/filesource.cmake | 6 | ||||
-rw-r--r-- | cmake/glfw.cmake | 3 | ||||
-rw-r--r-- | cmake/icu.cmake | 26 | ||||
-rw-r--r-- | cmake/mason-dependencies.cmake | 18 | ||||
-rw-r--r-- | cmake/node.cmake | 1 | ||||
-rw-r--r-- | cmake/nunicode.cmake | 5 | ||||
-rw-r--r-- | cmake/render.cmake | 1 | ||||
-rw-r--r-- | cmake/test.cmake | 15 | ||||
-rw-r--r-- | cmake/vendor.cmake | 23 |
11 files changed, 54 insertions, 87 deletions
diff --git a/cmake/benchmark.cmake b/cmake/benchmark.cmake index 7e0fd76917..a392e1344d 100644 --- a/cmake/benchmark.cmake +++ b/cmake/benchmark.cmake @@ -15,10 +15,6 @@ target_link_libraries(mbgl-benchmark target_add_mason_package(mbgl-benchmark PRIVATE boost) target_add_mason_package(mbgl-benchmark PRIVATE benchmark) -target_add_mason_package(mbgl-benchmark PRIVATE geojson) -target_add_mason_package(mbgl-benchmark PRIVATE rapidjson) -target_add_mason_package(mbgl-benchmark PRIVATE protozero) -target_add_mason_package(mbgl-benchmark PRIVATE vector-tile) mbgl_platform_benchmark() diff --git a/cmake/core.cmake b/cmake/core.cmake index 32e77f5d55..04b5f9ea18 100644 --- a/cmake/core.cmake +++ b/cmake/core.cmake @@ -7,21 +7,32 @@ target_include_directories(mbgl-core PRIVATE src ) -target_add_mason_package(mbgl-core PUBLIC geometry) -target_add_mason_package(mbgl-core PUBLIC variant) -target_add_mason_package(mbgl-core PRIVATE unique_resource) -target_add_mason_package(mbgl-core PRIVATE rapidjson) +target_link_libraries(mbgl-core PRIVATE + earcut.hpp + expected + geojson-vt-cpp + kdbush.hpp + shelf-pack-cpp + supercluster.hpp + unique_resource + wagyu +) + +# FIXME: We should not leak these many +# libraries in our public interface. +target_link_libraries(mbgl-core PUBLIC + geojson.hpp + geometry.hpp + icu + optional + polylabel + protozero + rapidjson + variant + vector-tile +) + target_add_mason_package(mbgl-core PRIVATE boost) -target_add_mason_package(mbgl-core PRIVATE geojson) -target_add_mason_package(mbgl-core PRIVATE geojsonvt) -target_add_mason_package(mbgl-core PRIVATE supercluster) -target_add_mason_package(mbgl-core PRIVATE kdbush) -target_add_mason_package(mbgl-core PRIVATE earcut) -target_add_mason_package(mbgl-core PRIVATE protozero) -target_add_mason_package(mbgl-core PRIVATE polylabel) -target_add_mason_package(mbgl-core PRIVATE wagyu) -target_add_mason_package(mbgl-core PRIVATE shelf-pack) -target_add_mason_package(mbgl-core PRIVATE vector-tile) mbgl_platform_core() diff --git a/cmake/filesource.cmake b/cmake/filesource.cmake index cfb04a5ce9..67926b6d77 100644 --- a/cmake/filesource.cmake +++ b/cmake/filesource.cmake @@ -1,14 +1,8 @@ -add_vendor_target(expected INTERFACE) - # Modify cmake/filesource-files.txt to change the source files for this target. load_sources_list(MBGL_FILESOURCE_FILES cmake/filesource-files.txt) add_library(mbgl-filesource STATIC ${MBGL_FILESOURCE_FILES}) -target_add_mason_package(mbgl-filesource PUBLIC geometry) -target_add_mason_package(mbgl-filesource PUBLIC variant) -target_add_mason_package(mbgl-filesource PRIVATE rapidjson) target_add_mason_package(mbgl-filesource PRIVATE boost) -target_add_mason_package(mbgl-filesource PRIVATE geojson) target_include_directories(mbgl-filesource PRIVATE include diff --git a/cmake/glfw.cmake b/cmake/glfw.cmake index eacc72d338..7430cac9d2 100644 --- a/cmake/glfw.cmake +++ b/cmake/glfw.cmake @@ -21,10 +21,7 @@ target_link_libraries(mbgl-glfw ) target_add_mason_package(mbgl-glfw PRIVATE cheap-ruler) -target_add_mason_package(mbgl-glfw PRIVATE geojson) -target_add_mason_package(mbgl-glfw PRIVATE geometry) target_add_mason_package(mbgl-glfw PRIVATE glfw) -target_add_mason_package(mbgl-glfw PRIVATE variant) target_add_mason_package(mbgl-glfw PRIVATE args) mbgl_platform_glfw() diff --git a/cmake/icu.cmake b/cmake/icu.cmake deleted file mode 100644 index ba98c7737a..0000000000 --- a/cmake/icu.cmake +++ /dev/null @@ -1,26 +0,0 @@ -add_vendor_target(icu STATIC) - -target_compile_definitions(icu - PRIVATE "-D_REENTRANT" - PRIVATE "-DU_HAVE_ATOMIC=1" - PRIVATE "-DU_HAVE_STRTOD_L=0" - PRIVATE "-DU_CHARSET_IS_UTF8=1" - PRIVATE "-DU_CHAR_TYPE=uint_least16_t" - PRIVATE "-DUCONFIG_NO_LEGACY_CONVERSION=1" - PRIVATE "-DUCONFIG_NO_BREAK_ITERATION=1" -) - -target_compile_options(icu - PRIVATE "-Wno-shadow" -) - -if(MBGL_PLATFORM STREQUAL "android") - target_compile_options(icu - PRIVATE "-Wno-tautological-unsigned-enum-zero-compare" - ) -elseif(MBGL_PLATFORM STREQUAL "ios") - target_compile_options(icu - PRIVATE "-Wno-shorten-64-to-32" - ) -endif() - diff --git a/cmake/mason-dependencies.cmake b/cmake/mason-dependencies.cmake index 24a63fa4f5..ea638510d0 100644 --- a/cmake/mason-dependencies.cmake +++ b/cmake/mason-dependencies.cmake @@ -1,22 +1,8 @@ # All dependencies in a single separate file so its checksum can be used in a CI cache key name -mason_use(geometry VERSION 0.9.3 HEADER_ONLY) -mason_use(variant VERSION 1.1.4 HEADER_ONLY) -mason_use(unique_resource VERSION cba309e HEADER_ONLY) -mason_use(rapidjson VERSION 1.1.0 HEADER_ONLY) mason_use(boost VERSION 1.65.1 HEADER_ONLY) -mason_use(geojsonvt VERSION 6.6.2 HEADER_ONLY) -mason_use(supercluster VERSION 0.2.2 HEADER_ONLY) -mason_use(kdbush VERSION 0.1.1-1 HEADER_ONLY) -mason_use(earcut VERSION 0.12.4 HEADER_ONLY) -mason_use(protozero VERSION 1.5.2 HEADER_ONLY) -mason_use(pixelmatch VERSION 0.10.0 HEADER_ONLY) -mason_use(geojson VERSION 0.4.2 HEADER_ONLY) -mason_use(polylabel VERSION 1.0.3 HEADER_ONLY) -mason_use(wagyu VERSION 0.4.3 HEADER_ONLY) -mason_use(shelf-pack VERSION 2.1.1 HEADER_ONLY) mason_use(cheap-ruler VERSION 2.5.3 HEADER_ONLY) -mason_use(vector-tile VERSION 1.0.2 HEADER_ONLY) +mason_use(pixelmatch VERSION 0.10.0 HEADER_ONLY) if(MBGL_PLATFORM STREQUAL "android") mason_use(jni.hpp VERSION 4.0.1 HEADER_ONLY) @@ -42,8 +28,6 @@ elseif(MBGL_PLATFORM STREQUAL "macos") mason_use(swiftshader VERSION 2018-05-31) endif() elseif(MBGL_PLATFORM STREQUAL "qt") - mason_use(optional VERSION f27e7908 HEADER_ONLY) - if(NOT WITH_QT_DECODERS) mason_use(libjpeg-turbo VERSION 1.5.0) mason_use(libpng VERSION 1.6.25) diff --git a/cmake/node.cmake b/cmake/node.cmake index 6750adc03c..cb98d570f7 100644 --- a/cmake/node.cmake +++ b/cmake/node.cmake @@ -57,7 +57,6 @@ target_link_libraries(mbgl-node INTERFACE mbgl-loop-node ) -target_add_mason_package(mbgl-node INTERFACE geojson) set_target_properties(mbgl-node.all PROPERTIES FOLDER "Node.js") add_custom_target(mbgl-node.active DEPENDS mbgl-node.abi-${NodeJS_ABI}) diff --git a/cmake/nunicode.cmake b/cmake/nunicode.cmake deleted file mode 100644 index 4a0f4f2c8c..0000000000 --- a/cmake/nunicode.cmake +++ /dev/null @@ -1,5 +0,0 @@ -add_vendor_target(nunicode STATIC) - -target_compile_definitions(nunicode - PRIVATE "-DNU_BUILD_STATIC" -) diff --git a/cmake/render.cmake b/cmake/render.cmake index 781b7ff2aa..a65cc5bf1c 100644 --- a/cmake/render.cmake +++ b/cmake/render.cmake @@ -11,7 +11,6 @@ target_link_libraries(mbgl-render ) target_add_mason_package(mbgl-render PRIVATE boost) -target_add_mason_package(mbgl-render PRIVATE geojson) target_add_mason_package(mbgl-render PRIVATE args) mbgl_platform_render() diff --git a/cmake/test.cmake b/cmake/test.cmake index 7d86dfdde8..05cc17c98e 100644 --- a/cmake/test.cmake +++ b/cmake/test.cmake @@ -22,20 +22,15 @@ target_include_directories(mbgl-test PRIVATE platform/default ) -target_link_libraries(mbgl-test - PRIVATE mbgl-core - PRIVATE gtest +target_link_libraries(mbgl-test PRIVATE + gtest + mbgl-core + shelf-pack-cpp + unique_resource ) -target_add_mason_package(mbgl-test PRIVATE geometry) -target_add_mason_package(mbgl-test PRIVATE variant) -target_add_mason_package(mbgl-test PRIVATE unique_resource) -target_add_mason_package(mbgl-test PRIVATE rapidjson) target_add_mason_package(mbgl-test PRIVATE pixelmatch) target_add_mason_package(mbgl-test PRIVATE boost) -target_add_mason_package(mbgl-test PRIVATE geojson) -target_add_mason_package(mbgl-test PRIVATE geojsonvt) -target_add_mason_package(mbgl-test PRIVATE shelf-pack) mbgl_platform_test() diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake new file mode 100644 index 0000000000..1aa522f92c --- /dev/null +++ b/cmake/vendor.cmake @@ -0,0 +1,23 @@ +execute_process( + COMMAND git submodule update --init . + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/vendor +) + +include(${CMAKE_SOURCE_DIR}/vendor/earcut.hpp.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/expected.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/geojson-vt-cpp.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/geojson.hpp.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/geometry.hpp.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/icu.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/kdbush.hpp.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/nunicode.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/optional.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/polylabel.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/protozero.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/rapidjson.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/shelf-pack-cpp.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/supercluster.hpp.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/unique_resource.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/variant.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/vector-tile.cmake) +include(${CMAKE_SOURCE_DIR}/vendor/wagyu.cmake) |