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

Using cmake-js instead of node-gyp #985

Open
artemp opened this issue Aug 22, 2022 · 6 comments
Open

Using cmake-js instead of node-gyp #985

artemp opened this issue Aug 22, 2022 · 6 comments
Assignees

Comments

@artemp
Copy link
Member

artemp commented Aug 22, 2022

https://github.com/cmake-js/cmake-js

/cc @mathisloge

@artemp artemp self-assigned this Aug 22, 2022
@mathisloge
Copy link

I can use this. Wasn't sure if I needed to be compatible with node-pre-gyp.
But if we change completly to cmake-js, it makes things easier for #976

@artemp
Copy link
Member Author

artemp commented Aug 22, 2022

@mathisloge - I have a branch using cmake-js, it's WIP but it can build mapnik.node against latest mapnik (mapnikConfig.cmake) and most tests are passing. Compatibility with node-pre-gyp is important to maintain somehow.. needs some thinking.
Let me push my changes into an experimental branch just a sec ..

@artemp
Copy link
Member Author

artemp commented Aug 22, 2022

https://github.com/mapnik/node-mapnik/tree/cmake-js

cmake-js -m clean
cmake-js -m configure 
cmake-js -m compile # or cd build -> make -j4

@mathisloge - It needs https://github.com/mapbox/mapnik-vector-tile/tree/proj6 and some manual
copying/editing e.g

cp -i ./build/Release/mapnik.node ./lib/binding/
 ...

but it works. I'd appreciate your thoughts.

@mathisloge
Copy link

I had #976 working with node-pre-gyp but moved away from cmake-js. I could add it back and leave it compatible with node-pre-gyp. So e.g. npm install would just work fine. I'm taking a closer look tomorrow evening.

But I need to finish the mapnik static PR before that, so the distribution will work fine :)

@artemp
Copy link
Member Author

artemp commented Aug 22, 2022

Can we add more info about dependencies used to build mapnik-core to mapnikConfig.cmake?

@mathisloge
Copy link

yeah, I can do that. But will do it with mapnik/mapnik#4291

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

No branches or pull requests

2 participants