FindNode: Update cmake module to support Fedora22 and check for errors

FindNode.cmake reports failure it cannot detect all required include files.
Module is now called with REQUIRED flag to prevent generation of makefiles
that will not build.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
Henry Bruce
2016-01-22 16:54:27 -08:00
committed by Abhishek Malik
parent 2331548f25
commit 8490a63309
2 changed files with 50 additions and 23 deletions

View File

@ -147,18 +147,11 @@ if (SWIG_FOUND)
endif(BUILDSWIGPYTHON)
if(BUILDSWIGNODE)
if(NOT NODE_FOUND)
find_package(Node)
find_package(Node REQUIRED)
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
${NODE_ROOT_DIR}/node
${NODE_ROOT_DIR}/deps/v8/include
${NODE_ROOT_DIR}/deps/uv/include
)
macro(createpackagejson)
configure_file (${PROJECT_SOURCE_DIR}/src/package.json.in ${CMAKE_CURRENT_BINARY_DIR}/package.json @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/package.json