summaryrefslogtreecommitdiff
path: root/cmake/test.cmake
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-05-24 11:25:12 +0200
committerKonstantin Käfer <mail@kkaefer.com>2018-05-24 21:50:29 +0200
commit2694c0df037265fd37c6b9dc709efd5fa3472b12 (patch)
tree40fdc111969ab54237db395cd140b0fc8e29c770 /cmake/test.cmake
parentb1f696155e2ff18e6d76c8f74eafadc7ee59cf71 (diff)
downloadqtlocation-mapboxgl-2694c0df037265fd37c6b9dc709efd5fa3472b12.tar.gz
[build] disable parts of the build that require node when WITH_NODEJS=OFF is set
Diffstat (limited to 'cmake/test.cmake')
-rw-r--r--cmake/test.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/test.cmake b/cmake/test.cmake
index 183263c5a9..d6a2565979 100644
--- a/cmake/test.cmake
+++ b/cmake/test.cmake
@@ -8,6 +8,11 @@ else()
)
endif()
+
+if(NOT WITH_NODEJS)
+ target_compile_definitions(mbgl-test PRIVATE "-DTEST_HAS_SERVER=0")
+endif()
+
set_source_files_properties(test/src/mbgl/test/util.cpp PROPERTIES COMPILE_FLAGS -DNODE_EXECUTABLE="${NodeJS_EXECUTABLE}")
target_include_directories(mbgl-test