Distributing cmake options in npm packages
See original GitHub issueI’m maintaining the nbind
project which autogenerates NAN and Emscripten bindings (and TypeScript definitions) for C++ classes and functions. It makes writing Node.js addons extremely easy but requires a number of compiler options to use especially when targeting Emscripten, so it comes with a couple of .gypi
files.
Another tool, autogypi
autogenerates a binding.gyp
file for a new project given names of packages it depends on. It plays nicely with both nbind
and nan
, noticing the former depends on the latter and sets everything up.
I’d like to add support for cmake-js
in nbind
and autogypi
, so that these quick start instructions would be equally easy when using cmake-js
instead of node-gyp
(this would be an option). That would also get rid of the Python 2 dependency (unless targeting Emscripten, which still depends on it).
For this, maybe some sort of interaction between cmake-js
and autogypi
would be useful? Do you have any thoughts for a standard way to include the necessary CMakeLists
options in npm packages intended to be used as C++ libraries?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top GitHub Comments
Did anything ever come of this? I’m currently trying to port an existing lib built with CMake and being able to use the build files almost as-is would be amazing…
edit: I’m currently trying to use nbind to target asm.js for in-browser usage
It sounds like this was answered, and as nbind appears abandoned I dont see anything here that needs doing