summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2018-11-16 17:53:17 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2018-11-16 18:58:30 +0200
commit9be6c8b1b77f8fc026caee8a09e0cf28e0781253 (patch)
treeaa642ad3a8c4aa0555581002846cceadbfed4ce9
parent8757ccddb0d3eb8b271e903244fabe6a21b401a1 (diff)
downloadqtlocation-mapboxgl-9be6c8b1b77f8fc026caee8a09e0cf28e0781253.tar.gz
[build] Add more vendor packages
* jni.hpp * cheap-ruler-cpp * pixelmatch-cpp
-rw-r--r--.gitmodules9
-rw-r--r--cmake/glfw.cmake2
-rw-r--r--cmake/mason-dependencies.cmake5
-rw-r--r--cmake/test.cmake3
-rw-r--r--cmake/vendor.cmake3
-rw-r--r--platform/android/config.cmake6
m---------vendor/cheap-ruler-cpp0
-rw-r--r--vendor/cheap-ruler-cpp.cmake6
m---------vendor/jni.hpp0
-rw-r--r--vendor/jni.hpp.cmake5
m---------vendor/pixelmatch-cpp0
-rw-r--r--vendor/pixelmatch-cpp.cmake5
12 files changed, 33 insertions, 11 deletions
diff --git a/.gitmodules b/.gitmodules
index 078c98c82e..780e5ad43a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -64,3 +64,12 @@
[submodule "vendor/benchmark"]
path = vendor/benchmark
url = https://github.com/google/benchmark.git
+[submodule "vendor/cheap-ruler-cpp"]
+ path = vendor/cheap-ruler-cpp
+ url = https://github.com/mapbox/cheap-ruler-cpp.git
+[submodule "vendor/pixelmatch-cpp"]
+ path = vendor/pixelmatch-cpp
+ url = https://github.com/mapbox/pixelmatch-cpp.git
+[submodule "vendor/jni.hpp"]
+ path = vendor/jni.hpp
+ url = https://github.com/mapbox/jni.hpp.git
diff --git a/cmake/glfw.cmake b/cmake/glfw.cmake
index 7430cac9d2..4ab4ad9c8d 100644
--- a/cmake/glfw.cmake
+++ b/cmake/glfw.cmake
@@ -18,9 +18,9 @@ target_include_directories(mbgl-glfw
target_link_libraries(mbgl-glfw
PRIVATE mbgl-core
+ PRIVATE cheap-ruler-cpp
)
-target_add_mason_package(mbgl-glfw PRIVATE cheap-ruler)
target_add_mason_package(mbgl-glfw PRIVATE glfw)
target_add_mason_package(mbgl-glfw PRIVATE args)
diff --git a/cmake/mason-dependencies.cmake b/cmake/mason-dependencies.cmake
index 3a7a3f2ef0..f007ab4c26 100644
--- a/cmake/mason-dependencies.cmake
+++ b/cmake/mason-dependencies.cmake
@@ -1,10 +1,7 @@
# All dependencies in a single separate file so its checksum can be used in a CI cache key name
-mason_use(cheap-ruler VERSION 2.5.3 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)
+ # noop
elseif(MBGL_PLATFORM STREQUAL "ios")
# noop
elseif(MBGL_PLATFORM STREQUAL "linux")
diff --git a/cmake/test.cmake b/cmake/test.cmake
index 23370bd744..053ba92d76 100644
--- a/cmake/test.cmake
+++ b/cmake/test.cmake
@@ -27,10 +27,9 @@ target_link_libraries(mbgl-test PRIVATE
mbgl-core
shelf-pack-cpp
unique_resource
+ pixelmatch-cpp
)
-target_add_mason_package(mbgl-test PRIVATE pixelmatch)
-
mbgl_platform_test()
create_source_groups(mbgl-test)
diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake
index 760754486e..17128d10ee 100644
--- a/cmake/vendor.cmake
+++ b/cmake/vendor.cmake
@@ -5,15 +5,18 @@ execute_process(
include(${CMAKE_SOURCE_DIR}/vendor/benchmark.cmake)
include(${CMAKE_SOURCE_DIR}/vendor/boost.cmake)
+include(${CMAKE_SOURCE_DIR}/vendor/cheap-ruler-cpp.cmake)
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/jni.hpp.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/pixelmatch-cpp.cmake)
include(${CMAKE_SOURCE_DIR}/vendor/polylabel.cmake)
include(${CMAKE_SOURCE_DIR}/vendor/protozero.cmake)
include(${CMAKE_SOURCE_DIR}/vendor/rapidjson.cmake)
diff --git a/platform/android/config.cmake b/platform/android/config.cmake
index 0e10e2af10..8c94842de5 100644
--- a/platform/android/config.cmake
+++ b/platform/android/config.cmake
@@ -42,9 +42,8 @@ macro(mbgl_platform_core)
PRIVATE platform/android
)
- target_add_mason_package(mbgl-core PUBLIC jni.hpp)
-
target_link_libraries(mbgl-core
+ PUBLIC jni.hpp
PUBLIC -llog
PUBLIC -landroid
PUBLIC -ljnigraphics
@@ -61,10 +60,9 @@ macro(mbgl_filesource)
# Modify platform/android/filesource-files.txt to change the source files for this target.
target_sources_from_file(mbgl-filesource PRIVATE platform/android/filesource-files.txt)
- target_add_mason_package(mbgl-filesource PUBLIC jni.hpp)
-
target_link_libraries(mbgl-filesource
PUBLIC sqlite
+ PUBLIC jni.hpp
PUBLIC -llog
PUBLIC -landroid
PUBLIC -lstdc++
diff --git a/vendor/cheap-ruler-cpp b/vendor/cheap-ruler-cpp
new file mode 160000
+Subproject 98cbe70dab74c5b77f139013ea5b3623d3ba3dc
diff --git a/vendor/cheap-ruler-cpp.cmake b/vendor/cheap-ruler-cpp.cmake
new file mode 100644
index 0000000000..8d98cde63c
--- /dev/null
+++ b/vendor/cheap-ruler-cpp.cmake
@@ -0,0 +1,6 @@
+add_library(cheap-ruler-cpp INTERFACE)
+
+target_include_directories(cheap-ruler-cpp SYSTEM INTERFACE
+ ${CMAKE_SOURCE_DIR}/vendor/cheap-ruler-cpp/include
+)
+
diff --git a/vendor/jni.hpp b/vendor/jni.hpp
new file mode 160000
+Subproject 8f55acd9017452f45a88ab3fb3aef89de995b72
diff --git a/vendor/jni.hpp.cmake b/vendor/jni.hpp.cmake
new file mode 100644
index 0000000000..bf3c129858
--- /dev/null
+++ b/vendor/jni.hpp.cmake
@@ -0,0 +1,5 @@
+add_library(jni.hpp INTERFACE)
+
+target_include_directories(jni.hpp SYSTEM INTERFACE
+ ${CMAKE_SOURCE_DIR}/vendor/jni.hpp/include
+)
diff --git a/vendor/pixelmatch-cpp b/vendor/pixelmatch-cpp
new file mode 160000
+Subproject 61f433cb485d6b08dc7fe97ae5f8717007c7bda
diff --git a/vendor/pixelmatch-cpp.cmake b/vendor/pixelmatch-cpp.cmake
new file mode 100644
index 0000000000..8efa527133
--- /dev/null
+++ b/vendor/pixelmatch-cpp.cmake
@@ -0,0 +1,5 @@
+add_library(pixelmatch-cpp INTERFACE)
+
+target_include_directories(pixelmatch-cpp SYSTEM INTERFACE
+ ${CMAKE_SOURCE_DIR}/vendor/pixelmatch-cpp/include
+)