RobLoach / node-raylib

Node.js bindings for Raylib
https://robloach.github.io/node-raylib/
Other
233 stars 20 forks source link

Add CMake platform options #157

Closed RobLoach closed 1 year ago

konsumer commented 2 years ago

I wonder if we need all the extra scripts. like you should be able to run npm run compile --CDPLATFORM=DRM one issue with more script-names is we have to setup precompile to run before them. It's automatic for npm run compile, but not compile:pi. Here is another way that I think would trigger right:

"compile:drm": "npm run compile --CDPLATFORM=DRM",
    "compile:desktop": "npm run compile --CDPLATFORM=Desktop",
    "compile:web": "npm run compile --CDPLATFORM=Web",
    "compile:android": "npm run compile --CDPLATFORM=Android",
    "compile:rpi": "npm run compile --CDPLATFORM='Raspberry Pi'",

I'm not totally sure, though. I know at one point, for npm scripts, you had to do -- --CDPLATFORM=Web, so maybe that would be a better choice here (it shouldn't hurt more modern versions, but will work on older node.)