[build] use node-cmake 2.x

- Removes need to run `npm install` before invoking cmake
This commit is contained in:
Konstantin Käfer
2017-02-21 18:32:53 +01:00
parent 341e65f7d5
commit 5b24b14741
5 changed files with 612 additions and 19 deletions

View File

@@ -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