summaryrefslogtreecommitdiff
path: root/cmake/node.cmake
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-02-21 18:32:53 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-02-22 18:22:18 +0100
commit5b24b1474187807b46de2e4c4fb587bcdee4d1ea (patch)
tree013a4e592303d956e935969f1305695dada1edb3 /cmake/node.cmake
parent341e65f7d51e7acc0bf73893317251adc4d23cb6 (diff)
downloadqtlocation-mapboxgl-5b24b1474187807b46de2e4c4fb587bcdee4d1ea.tar.gz
[build] use node-cmake 2.x
- Removes need to run `npm install` before invoking cmake
Diffstat (limited to 'cmake/node.cmake')
-rw-r--r--cmake/node.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/node.cmake b/cmake/node.cmake
index ea28e86106..2dd4a66c38 100644
--- a/cmake/node.cmake
+++ b/cmake/node.cmake
@@ -1,7 +1,15 @@
+# Load Node.js
+include(cmake/NodeJS.cmake)
+nodejs_init()
+
add_nodejs_module(mbgl-node
platform/node/src/node_mapbox_gl_native.cpp
)
+# NodeJS.cmake forces C++11.
+# https://github.com/cjntaylor/node-cmake/issues/18
+set_target_properties("mbgl-node" PROPERTIES CXX_STANDARD 14)
+
target_sources(mbgl-node
PRIVATE platform/node/src/node_logging.hpp
PRIVATE platform/node/src/node_logging.cpp