summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt18
-rw-r--r--cmake/mason-dependencies.cmake66
-rw-r--r--platform/android/config.cmake5
-rw-r--r--platform/ios/config.cmake2
-rw-r--r--platform/linux/config.cmake12
-rw-r--r--platform/macos/config.cmake6
-rw-r--r--platform/qt/config.cmake15
7 files changed, 67 insertions, 57 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d0552ce0f2..9127b872e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,23 +44,7 @@ endif()
set_source_files_properties(src/mbgl/util/version.cpp PROPERTIES COMPILE_DEFINITIONS MBGL_VERSION_REV="${MBGL_VERSION_REV}")
-mason_use(geometry VERSION 0.9.2 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.3.0 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.1 HEADER_ONLY)
+include(cmake/mason-dependencies.cmake)
add_definitions(-DRAPIDJSON_HAS_STDSTRING=1)
diff --git a/cmake/mason-dependencies.cmake b/cmake/mason-dependencies.cmake
new file mode 100644
index 0000000000..6ead583936
--- /dev/null
+++ b/cmake/mason-dependencies.cmake
@@ -0,0 +1,66 @@
+# 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.2 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.3.0 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.1 HEADER_ONLY)
+
+if(MBGL_PLATFORM STREQUAL "android")
+ mason_use(jni.hpp VERSION 3.0.0 HEADER_ONLY)
+ mason_use(sqlite VERSION 3.14.2)
+ mason_use(gtest VERSION 1.8.0)
+ mason_use(icu VERSION 58.1-min-size)
+elseif(MBGL_PLATFORM STREQUAL "ios")
+ mason_use(icu VERSION 58.1-min-size)
+elseif(MBGL_PLATFORM STREQUAL "linux")
+ mason_use(glfw VERSION 2018-06-27-0be4f3f)
+ mason_use(sqlite VERSION 3.14.2)
+ mason_use(libuv VERSION 1.9.1)
+ mason_use(libpng VERSION 1.6.25)
+ mason_use(libjpeg-turbo VERSION 1.5.0)
+ mason_use(webp VERSION 0.5.1)
+ mason_use(gtest VERSION 1.8.0${MASON_CXXABI_SUFFIX})
+ mason_use(benchmark VERSION 1.2.0)
+ mason_use(icu VERSION 58.1-min-size)
+ mason_use(args VERSION 6.2.0 HEADER_ONLY)
+
+ if(WITH_EGL)
+ mason_use(swiftshader VERSION 2017-11-20)
+ endif()
+elseif(MBGL_PLATFORM STREQUAL "macos")
+ mason_use(glfw VERSION 2018-06-27-0be4f3f)
+ mason_use(gtest VERSION 1.8.0)
+ mason_use(benchmark VERSION 1.2.0)
+ mason_use(icu VERSION 58.1-min-size)
+ mason_use(args VERSION 6.2.0 HEADER_ONLY)
+elseif(MBGL_PLATFORM STREQUAL "qt")
+ mason_use(optional VERSION f27e7908 HEADER_ONLY)
+ mason_use(tao_tuple VERSION 28626e99 HEADER_ONLY)
+
+ if(NOT WITH_QT_DECODERS)
+ mason_use(libjpeg-turbo VERSION 1.5.0)
+ mason_use(libpng VERSION 1.6.25)
+ mason_use(webp VERSION 0.5.1)
+ endif()
+
+ if(NOT WITH_QT_I18N)
+ mason_use(icu VERSION 58.1-min-size)
+ endif()
+
+ if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+ mason_use(gtest VERSION 1.8.0${MASON_CXXABI_SUFFIX})
+ endif()
+endif()
diff --git a/platform/android/config.cmake b/platform/android/config.cmake
index fa26987e5a..88130dc104 100644
--- a/platform/android/config.cmake
+++ b/platform/android/config.cmake
@@ -21,11 +21,6 @@ endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -Wl,--version-script=${CMAKE_SOURCE_DIR}/platform/android/version-script")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -Wl,--version-script=${CMAKE_SOURCE_DIR}/platform/android/version-script")
-mason_use(jni.hpp VERSION 3.0.0 HEADER_ONLY)
-mason_use(sqlite VERSION 3.14.2)
-mason_use(gtest VERSION 1.8.0)
-mason_use(icu VERSION 58.1-min-size)
-
## mbgl core ##
macro(mbgl_platform_core)
diff --git a/platform/ios/config.cmake b/platform/ios/config.cmake
index a607fbdf35..6dd3f23a69 100644
--- a/platform/ios/config.cmake
+++ b/platform/ios/config.cmake
@@ -1,7 +1,5 @@
add_definitions(-DMBGL_USE_GLES2=1)
-mason_use(icu VERSION 58.1-min-size)
-
macro(initialize_ios_target target)
set_xcode_property(${target} IPHONEOS_DEPLOYMENT_TARGET "9.0")
set_xcode_property(${target} ENABLE_BITCODE "YES")
diff --git a/platform/linux/config.cmake b/platform/linux/config.cmake
index 08376cbfa3..c1eb4bfe12 100644
--- a/platform/linux/config.cmake
+++ b/platform/linux/config.cmake
@@ -1,16 +1,5 @@
include(cmake/nunicode.cmake)
-mason_use(glfw VERSION 2018-06-27-0be4f3f)
-mason_use(sqlite VERSION 3.14.2)
-mason_use(libuv VERSION 1.9.1)
-mason_use(libpng VERSION 1.6.25)
-mason_use(libjpeg-turbo VERSION 1.5.0)
-mason_use(webp VERSION 0.5.1)
-mason_use(gtest VERSION 1.8.0${MASON_CXXABI_SUFFIX})
-mason_use(benchmark VERSION 1.2.0)
-mason_use(icu VERSION 58.1-min-size)
-mason_use(args VERSION 6.2.0 HEADER_ONLY)
-
add_library(mbgl-loop-uv STATIC
platform/default/async_task.cpp
platform/default/run_loop.cpp
@@ -40,7 +29,6 @@ macro(mbgl_platform_core)
target_sources(mbgl-core
PRIVATE platform/linux/src/headless_backend_egl.cpp
)
- mason_use(swiftshader VERSION 2017-11-20)
target_add_mason_package(mbgl-core PUBLIC swiftshader)
else()
target_sources(mbgl-core
diff --git a/platform/macos/config.cmake b/platform/macos/config.cmake
index 20ac7bc242..6333beaeb5 100644
--- a/platform/macos/config.cmake
+++ b/platform/macos/config.cmake
@@ -1,11 +1,5 @@
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11)
-mason_use(glfw VERSION 2018-06-27-0be4f3f)
-mason_use(gtest VERSION 1.8.0)
-mason_use(benchmark VERSION 1.2.0)
-mason_use(icu VERSION 58.1-min-size)
-mason_use(args VERSION 6.2.0 HEADER_ONLY)
-
include(cmake/loop-darwin.cmake)
macro(mbgl_platform_core)
diff --git a/platform/qt/config.cmake b/platform/qt/config.cmake
index 757c0ac44a..785b3cd76a 100644
--- a/platform/qt/config.cmake
+++ b/platform/qt/config.cmake
@@ -1,19 +1,6 @@
-mason_use(optional VERSION f27e7908 HEADER_ONLY)
-mason_use(tao_tuple VERSION 28626e99 HEADER_ONLY)
-
include(platform/qt/qt.cmake)
include(cmake/nunicode.cmake)
-if(NOT WITH_QT_DECODERS)
- mason_use(libjpeg-turbo VERSION 1.5.0)
- mason_use(libpng VERSION 1.6.25)
- mason_use(webp VERSION 0.5.1)
-endif()
-
-if(NOT WITH_QT_I18N)
- mason_use(icu VERSION 58.1-min-size)
-endif()
-
macro(mbgl_platform_core)
target_sources(mbgl-core
${MBGL_QT_CORE_FILES}
@@ -76,8 +63,6 @@ endmacro()
# FIXME: For now tests are disabled on Windows until we
# get the node.js dependencies working.
if (NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
- mason_use(gtest VERSION 1.8.0${MASON_CXXABI_SUFFIX})
-
macro(mbgl_platform_test)
target_sources(mbgl-test
PRIVATE platform/qt/test/main.cpp