You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for alternative build tools (node-cmake) #205
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 to node-pre-gyp build by providing an alternative to lib/util/compile.js that calls the appropriate ncmake commands instead of their node-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 into node-pre-cmake.
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).
+1 here. Maybe it's simpler just to define somewhere commands which can be overridden, but call node-gyp by default? So that it will be a matter of changing some vars to from node-gyp build to cmake && make instead
0181532686cf4a31163be0bf3e6bb6732bf commented on Sep 3, 2016
@danpat would you consider sharing your changes to lib/util/compile.js? I am also preferring node-cmake these days (in part, due to CLion's nice CMake support).
Activity
daniel-j-h commentedon May 14, 2016
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).
Use gyp.js
0181532686cf4a31163be0bf3e6bb6732bf commentedon Sep 3, 2016
+1 here. Maybe it's simpler just to define somewhere commands which can be overridden, but call
node-gypby default? So that it will be a matter of changing some vars to fromnode-gyp buildtocmake && makeinstead0181532686cf4a31163be0bf3e6bb6732bf commentedon Sep 3, 2016
I think I've found a workaround: https://gyp.gsrc.io/docs/LanguageSpecification.md#Actions
TheMarex commentedon Jan 17, 2017
Current work-a-round we use in
node-osrmfor this is adding the following to the package.json:That way we defer to the makefile in case we need to actually compile code and run our own cmake based toolchain.
markandrus commentedon Dec 30, 2017
@danpat would you consider sharing your changes to
lib/util/compile.js? I am also preferring node-cmake these days (in part, due to CLion's nice CMake support).