CMake: Update FindNpm module and usage

FindNpm REQUIRE functionality was not provided by FindNpm.cmake.
UpdatedUpdated FindNpm to extract version, global node_modules
directory, and to fail if REQUIRE was set and npm was not found.

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2018-02-06 14:11:28 -08:00
parent 7d83e8c569
commit 6f72c52a44
2 changed files with 68 additions and 15 deletions

View File

@ -151,11 +151,6 @@ if (BUILDSWIGNODE)
find_package (Node REQUIRED)
if (BUILDTESTS)
find_package (Npm REQUIRED)
if(NPM_EXECUTABLE)
message(STATUS "NPM Executable found at: ${NPM_EXECUTABLE}")
else()
message(FATAL_ERROR "Please install NPM first, you can't run tests without it")
endif()
endif (BUILDTESTS)
endif (BUILDSWIGNODE)