summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-08-30 16:29:13 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-02 14:09:08 +0300
commit26ea9798b766e312bb06f4d9f4b7ff99359ad6e1 (patch)
tree590542e6e7e7dc3f44c6bfeaad91cd3c3a82357c /cmake
parent02c9918b8399e7a312c31308007b79d322ce7708 (diff)
downloadqtlocation-mapboxgl-26ea9798b766e312bb06f4d9f4b7ff99359ad6e1.tar.gz
[build] Use rapidjson from mapbox-base
Diffstat (limited to 'cmake')
-rw-r--r--cmake/core.cmake2
-rw-r--r--cmake/render-test.cmake2
-rw-r--r--cmake/vendor.cmake12
3 files changed, 13 insertions, 3 deletions
diff --git a/cmake/core.cmake b/cmake/core.cmake
index d0c6be9f59..f08ff6bcab 100644
--- a/cmake/core.cmake
+++ b/cmake/core.cmake
@@ -31,7 +31,7 @@ target_link_libraries(mbgl-core PUBLIC
${ICU_LIBRARY}
polylabel
protozero
- rapidjson
+ Mapbox::Base::Extras::rapidjson
vector-tile
)
diff --git a/cmake/render-test.cmake b/cmake/render-test.cmake
index 58546ca165..9bc37df808 100644
--- a/cmake/render-test.cmake
+++ b/cmake/render-test.cmake
@@ -24,7 +24,7 @@ target_link_libraries(mbgl-render-test PRIVATE
expected
Mapbox::Base::Extras::filesystem
Mapbox::Base::pixelmatch-cpp
- rapidjson
+ Mapbox::Base::Extras::rapidjson
)
add_definitions(-DTEST_RUNNER_ROOT_PATH="${CMAKE_SOURCE_DIR}")
diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake
index 47f32698bb..6286c0c31c 100644
--- a/cmake/vendor.cmake
+++ b/cmake/vendor.cmake
@@ -15,7 +15,6 @@ include(${CMAKE_SOURCE_DIR}/vendor/icu.cmake)
include(${CMAKE_SOURCE_DIR}/vendor/nunicode.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/unique_resource.cmake)
include(${CMAKE_SOURCE_DIR}/vendor/vector-tile.cmake)
@@ -25,6 +24,17 @@ if(NOT TARGET mapbox-base)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/vendor/mapbox-base ${CMAKE_BINARY_DIR}/.build-mapbox-gl-native-mapbox-base)
endif()
+target_compile_definitions(mapbox-base-extras-rapidjson INTERFACE
+ RAPIDJSON_HAS_STDSTRING=1
+)
+
+if(WIN32)
+ target_compile_definitions(mapbox-base-extras-rapidjson INTERFACE
+ RAPIDJSON_HAS_CXX11_RVALUE_REFS
+ )
+endif()
+
+
if(MBGL_PLATFORM STREQUAL "linux" OR MBGL_PLATFORM STREQUAL "macos")
include(${CMAKE_SOURCE_DIR}/vendor/glfw.cmake)
endif()