summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-10-04 09:22:01 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-10-04 10:09:53 +0300
commitbfebc25b023dd9e17081ddb890f5664d6d018738 (patch)
tree55c154d170a967c91664ff7513549d6d81d99c0f
parent4b4e82864783a28c0785ebbf2edea84a722d46ae (diff)
downloadqtlocation-mapboxgl-upstream/next-mapbox-base-subdir.tar.gz
[build] Skip adding mapbox-base subdir if target existsupstream/next-mapbox-base-subdir
-rw-r--r--next/CMakeLists.txt5
-rw-r--r--next/test/CMakeLists.txt2
-rw-r--r--next/test/CTestCustom.cmake9
3 files changed, 14 insertions, 2 deletions
diff --git a/next/CMakeLists.txt b/next/CMakeLists.txt
index df56f04b22..5c95003054 100644
--- a/next/CMakeLists.txt
+++ b/next/CMakeLists.txt
@@ -877,8 +877,9 @@ target_include_directories(
PUBLIC ${MBGL_ROOT}/include
)
-add_subdirectory(${PROJECT_SOURCE_DIR}/vendor/mapbox-base/mapbox)
-add_subdirectory(${PROJECT_SOURCE_DIR}/vendor/mapbox-base/extras)
+if(NOT TARGET mapbox-base)
+ add_subdirectory(${PROJECT_SOURCE_DIR}/vendor/mapbox-base)
+endif()
include(${PROJECT_SOURCE_DIR}/vendor/boost.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/earcut.hpp.cmake)
diff --git a/next/test/CMakeLists.txt b/next/test/CMakeLists.txt
index 586e2bbdaa..180745c4f5 100644
--- a/next/test/CMakeLists.txt
+++ b/next/test/CMakeLists.txt
@@ -1,3 +1,5 @@
+configure_file(${PROJECT_SOURCE_DIR}/test/CTestCustom.cmake ${CMAKE_BINARY_DIR})
+
add_library(
mbgl-test SHARED EXCLUDE_FROM_ALL
${MBGL_ROOT}/test/actor/actor.test.cpp
diff --git a/next/test/CTestCustom.cmake b/next/test/CTestCustom.cmake
new file mode 100644
index 0000000000..d75b2e3ee2
--- /dev/null
+++ b/next/test/CTestCustom.cmake
@@ -0,0 +1,9 @@
+set(
+ CTEST_CUSTOM_TESTS_IGNORE
+ include-test-bundle
+ include-test-targets
+ io-test
+ weak-test
+ typewrapper-test
+ value-test
+)