Node-API utilities for CMake.
npm i cmake-napi
find_package(cmake-napi REQUIRED PATHS node_modules/cmake-napi)This is digidem's fork of
holepunchto/cmake-napi. It links
.node addons against digidem/nodejs-mobile
releases for Android and iOS instead of downloading Node.js headers from
nodejs.org, and it builds iOS targets (upstream skips iOS).
Configure with CMake cache variables:
NAPI_NODE_VERSION(default24.19.0-0): nodejs-mobile release to build against, without the leadingv.NAPI_NODE_MOBILE_REPO(defaultdigidem/nodejs-mobile): GitHub repository hosting the releases.
Only the nodejs-mobile v24 release line is supported. The last revision that
worked with legacy nodejs-mobile v18 is tagged
legacy-nodejs-mobile-v18.
Apache-2.0