Add optionally the paths to V8 and UV in find nodejs cmake script.
@@ -441,7 +441,15 @@ if(NOT NODEJS_LIBRARY)
endif()
endif()
-set(NODEJS_INCLUDE_DIRS "${NODEJS_INCLUDE_DIR}" "${NODEJS_V8_INCLUDE_DIR}" "${NODEJS_UV_INCLUDE_DIR}")
+set(NODEJS_INCLUDE_DIRS "${NODEJS_INCLUDE_DIR}")
+
+if(NODEJS_V8_INCLUDE_DIR)
+ set(NODEJS_INCLUDE_DIRS "${NODEJS_INCLUDE_DIRS}" "${NODEJS_V8_INCLUDE_DIR}")
+endif()
+
+if(NODEJS_UV_INCLUDE_DIR)
+ set(NODEJS_INCLUDE_DIRS "${NODEJS_INCLUDE_DIRS}" "${NODEJS_UV_INCLUDE_DIR}")
+endif()
find_package_handle_standard_args(NODEJS
REQUIRED_VARS NODEJS_EXECUTABLE NODEJS_INCLUDE_DIRS NODEJS_LIBRARY
