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
CMake.js is quite awesome and easy to use. Even used in Microsoft/napajs!
It will be greate to add support for cmake.js.
Currently electron-rebuild can only recognize the binding.gyp file, I think it should be quite easy to add support for cmake.js.
Reacted by Kees Kluskens, Kiril Popov, Nick, joshuafc and Ross Gardiner
@xVanTuring thank you for the slight work around. When I make your suggested change, it does build via cmake, but not at the correct Node Module Version on my end. Do you have any suggestions?
I would also appreciate official support for cmake-js
Found the problem between node-gyp and cmake-js
node-gyp is patching extra definitions behind the scenes cmake-js/cmake-js#222 (comment)
Adding them into my cmake-js then everything works and I can run my native module in electron compiling my module outside of electron-rebuild and then just bringing it in manually.
Figured I would close the loop on this; other people might come here with issues.
Activity
xVanTuring commentedon Jan 17, 2019
Well, Simply add an empty binding.gyp will work .
Official support will be awesome. Should I Leave it open?
incomingstick commentedon Oct 2, 2019
@xVanTuring thank you for the slight work around. When I make your suggested change, it does build via cmake, but not at the correct Node Module Version on my end. Do you have any suggestions?
I would also appreciate official support for cmake-js
almoghamdani commentedon Dec 16, 2019
Are there any plans on adding this feature?
malept commentedon Dec 18, 2019
This is on my TODO list, but it's pretty far down. We'd be happy to have a contribution to add support for this from the community, though!
smalls12 commentedon Jan 30, 2021
Any update on this?
I have a native module that when built with cmake-js it works fine.
When it builds with node-gyp it behaves differently.
Obviously that is just an issue on my end, but if electron-rebuild could use cmake-js it would solve my problem lol
I tried the blank binding.gyp trick noted above, but electron-rebuild then says it can't parse the file :(
smalls12 commentedon Jan 31, 2021
Found the problem between node-gyp and cmake-js
node-gyp is patching extra definitions behind the scenes
cmake-js/cmake-js#222 (comment)
Adding them into my cmake-js then everything works and I can run my native module in electron compiling my module outside of electron-rebuild and then just bringing it in manually.
Figured I would close the loop on this; other people might come here with issues.
zhex900 commentedon Jun 10, 2021
I am trying to rebuild aws-crt so it will work with electron.
@xVanTuring said adding an empty
binding.gypwill work. Where do I add this file?@smalls12 what exactly did you do to make your native module work?
zhex900 commentedon Jun 16, 2021
An empty
binding.gypdoes not work for me. By addingbinding.gyptoaws-crtI get these errors:
dogeFu commentedon Nov 10, 2021
Is cmake-js supported now?
asmbaty commentedon Sep 20, 2022
Is there a final workaround for how to use
cmake-jswithelectron-rebuildor how to avoid it?