mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
cmake: updated to support building with nodejs 0.12 and swig 3.0.5
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
5bc5379640
commit
f893613e99
@ -37,6 +37,7 @@ if (NODE_EXECUTABLE)
|
||||
list (GET _VERSION_LIST 2 NODE_VERSION_PATCH)
|
||||
set (V8_VERSION_STRING ${_V8_VERSION})
|
||||
string (REPLACE "." ";" _V8_VERSION_LIST "${_V8_VERSION}")
|
||||
string (REPLACE "." "" V8_DEFINE_STRING "${_V8_VERSION}")
|
||||
list (GET _V8_VERSION_LIST 0 V8_VERSION_MAJOR)
|
||||
list (GET _V8_VERSION_LIST 1 V8_VERSION_MINOR)
|
||||
list (GET _V8_VERSION_LIST 2 V8_VERSION_PATCH)
|
||||
|
@ -43,7 +43,7 @@ macro(upm_SWIG_NODE)
|
||||
"${NODE_INCLUDE_DIRS}"
|
||||
)
|
||||
set_target_properties (jsupm_${libname} PROPERTIES
|
||||
COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -DBUILDING_NODE_EXTENSION"
|
||||
COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -DBUILDING_NODE_EXTENSION -DSWIG_V8_VERSION=0x0${V8_DEFINE_STRING}"
|
||||
PREFIX ""
|
||||
SUFFIX ".node"
|
||||
)
|
||||
@ -80,6 +80,12 @@ if (SWIG_FOUND)
|
||||
list (GET PYTHON_VERSION_LIST 1 PYTHON_VERSION_MINOR)
|
||||
endif(BUILDSWIGPYTHON)
|
||||
if(BUILDSWIGNODE)
|
||||
if(NOT NODE_FOUND)
|
||||
find_package(Node)
|
||||
endif()
|
||||
if(SWIG_VERSION VERSION_LESS 3.0.5 AND NODE_VERSION_STRING VERSION_GREATER 0.12)
|
||||
message("WARNING - SWIG 3.0.5+ required for building with nodejs 0.12. Current version is ${SWIG_VERSION}")
|
||||
endif()
|
||||
find_path (NODE_ROOT_DIR "node/node.h")
|
||||
set (NODE_INCLUDE_DIRS
|
||||
${NODE_ROOT_DIR}/src
|
||||
|
Loading…
x
Reference in New Issue
Block a user