Private
Public Access
2
0

javascript: Add nodejs 4.1.1 support

API changes in V8 API mean that node.js 4 needs some changes both in mraajs.i
but also require a C++11 compiler

Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
xbolshe
2015-10-01 22:32:45 +03:00
committed by Brendan Le Foll
parent 24d4446193
commit 3059c06fa0
3 changed files with 44 additions and 10 deletions

View File

@@ -23,6 +23,15 @@ set_target_properties (mraajs PROPERTIES
OUTPUT_NAME mraa
SUFFIX ".node"
)
if (${V8_VERSION_MAJOR} GREATER 3)
message (INFO " - Using V8 version > 3 so requiring C++11 compiler")
# Node 0.12.x V8 engine major version is '3'.
# Node 2.1.0 V8 engine major version is '4'.
set_property (TARGET mraajs PROPERTY CXX_STANDARD 11)
set_property (TARGET mraajs PROPERTY CXX_STANDARD_REQUIRED ON)
endif ()
macro (mraa_CREATE_INSTALL_PACKAGE_JSON generated_file install_location)
configure_file (${generated_file}.cmake ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} @ONLY)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} DESTINATION ${install_location})