-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for alternative build tools (node-cmake) #205
Comments
For the record, when adding this I had to update the CMake min. version to 3.1 as node-cmake uses some advanced features. This may be a problem for users e.g. on Ubuntu <= Trusty (which is somewhat bad since Trusty is LTS). |
- Avoids python dependency - Defaults to using ninja.js if ninja is not installed - refs indutny/gyp.js#25 - refs indutny/gyp.js#21 - refs #121 - refs mapbox/node-pre-gyp#205
+1 here. Maybe it's simpler just to define somewhere commands which can be overridden, but call |
I think I've found a workaround: https://gyp.gsrc.io/docs/LanguageSpecification.md#Actions |
Current work-a-round we use in
That way we defer to the makefile in case we need to actually compile code and run our own cmake based toolchain. |
@danpat would you consider sharing your changes to |
In an effort to ditch the python dependency of
node-gyp
, we've been experimenting withnode-cmake
, which is a thin wrapper aroundcmake
.It's use is quite straightforward if you're already using CMake. We just added this:
https://github.com/mapbox/route-annotator/blob/b07d7751988419482b84e536ec84205543466c88/CMakeLists.txt#L44-L62
and we can build our
.node
binary with:./node_modules/.bin/ncmake --build
After this is run, all the usual
node-pre-gyp package
,node-pre-gyp publish
commands work as expected.With a little bit of hackery, I added support for
ncmake
tonode-pre-gyp build
by providing an alternative tolib/util/compile.js
that calls the appropriatencmake
commands instead of theirnode-gyp
equivalents.Would it make sense to support alternative build tools like this in
node-pre-gyp
on a larger scale? The publishing logic is well established and independent of the build tool.An alternative might be to fork
node-pre-gyp
intonode-pre-cmake
.The text was updated successfully, but these errors were encountered: