summaryrefslogtreecommitdiff
path: root/cmake/mbgl.cmake
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-08-15 14:36:16 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-08-16 15:29:34 +0200
commit51391740bf324fd7131f069d1d2d106113560df3 (patch)
tree93b93bd806525966b531ed8d7b1aeeee43705058 /cmake/mbgl.cmake
parent4e211548d5029a353aaa8814c40599970a8098bd (diff)
downloadqtlocation-mapboxgl-51391740bf324fd7131f069d1d2d106113560df3.tar.gz
[build] convert build-shaders script from Python to Node.js
Diffstat (limited to 'cmake/mbgl.cmake')
-rw-r--r--cmake/mbgl.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/mbgl.cmake b/cmake/mbgl.cmake
index c73127ab3f..f20f49004c 100644
--- a/cmake/mbgl.cmake
+++ b/cmake/mbgl.cmake
@@ -12,6 +12,17 @@ endif()
set(MBGL_GENERATED ${CMAKE_BINARY_DIR}/generated/${CMAKE_CFG_INTDIR})
+if(NOT EXISTS ${CMAKE_SOURCE_DIR}/node_modules/node-cmake/FindNodeJS.cmake)
+ message(FATAL_ERROR "Can't find node-cmake")
+endif()
+
+# Load Node.js
+set(NodeJS_CXX_STANDARD 14 CACHE INTERNAL "Use C++14" FORCE)
+set(NodeJS_DOWNLOAD ON CACHE INTERNAL "Download node.js sources" FORCE)
+set(NodeJS_USE_CLANG_STDLIB OFF CACHE BOOL "Don't use libc++ by default" FORCE)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/node_modules/node-cmake)
+find_package(NodeJS)
+
# Generate source groups so the files are properly sorted in IDEs like Xcode.
function(create_source_groups target)
get_target_property(sources ${target} SOURCES)