Skip to content

Instantly share code, notes, and snippets.

@gdianaty
gdianaty / cmakejs.cmake
Last active February 23, 2024 04:32
CMake.js Inclusion Function for ordinary CMake
# Authored by Graham Dianaty for Bitlogix Technologies. Based on code from Rene Hollander. ==========//
function(setup_cmakejs)
find_program(CMAKEJS "cmake-js")
find_program(NPM "npm")
# first, check if we have NPM:
if(NPM)
message(VERBOSE "NPM found.")
else()
message(FATAL_ERROR "NPM not found. This project requires Node.js")
endif()