Skip to content
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

Building addons with cmake #381

Closed
mhdawson opened this issue Aug 29, 2019 · 6 comments
Closed

Building addons with cmake #381

mhdawson opened this issue Aug 29, 2019 · 6 comments
Milestone

Comments

@mhdawson
Copy link
Member

See: nodejs/node-addon-api#445

Creating issue so we make sure to discuss, ideally when we have @jschlight in the meeting.

@mhdawson mhdawson added this to the Milestone 11 milestone Aug 29, 2019
@mhdawson
Copy link
Member Author

Nicola, we should look at existing solutions like cmake-js and see if they need any updates to support node-addon-api.

Jim, the work he did for pre-build was for cmake-js.

Nicola, maybe we can move some of what Jim did for pre-build to cmake-js so that all dependencies can leverage that.

Jim, cmake-js is pretty generic, did not have to do much, only document what you needed there.

Nicola then it might just be a matter of documentation.

Jim will:

@gengjiawen
Copy link
Member

gengjiawen commented Sep 19, 2019

node-gyp already support generate cmake config. I have used it in Clion, works pretty well (code autocomplete and debug).

@jschlight
Copy link
Collaborator

jschlight commented Sep 27, 2019

I've added a comment here about building N-API addons using CMake.js: nodejs/node-addon-api#445 (comment)

@jschlight
Copy link
Collaborator

jschlight commented Sep 30, 2019

During today's call we discussed the behavior of CMake.js when the underlying CMake executable is not installed. Here's what I found:

spare:~ jim$ npm install -g cmake-js
/Users/jim/.nvm/versions/node/v10.16.3/bin/cmake-js -> /Users/jim/.nvm/versions/node/v10.16.3/lib/node_modules/cmake-js/bin/cmake-js
+ [email protected]
added 140 packages from 108 contributors in 8.486s
spare:~ jim$ cmake
-bash: cmake: command not found
spare:~ jim$ cmake-js
[ '/Users/jim/.nvm/versions/node/v10.16.3/bin/node',
  '/Users/jim/.nvm/versions/node/v10.16.3/bin/cmake-js' ]
info TOOL Using Unix Makefiles generator.
ERR! OMG CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
spare:~ jim$ 

CMake.js displays a message instructing the user to install the CMake executable if it is not found.

@mhdawson
Copy link
Member Author

mhdawson commented Oct 1, 2019

@jschlight thanks for checking that out. Great to see that it shows a good message.

@jschlight
Copy link
Collaborator

The PR merge should have closed this issue? But maybe the automatic close does not work between repos?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants