node-raylib icon indicating copy to clipboard operation
node-raylib copied to clipboard

Add CMake platform options

Open RobLoach opened this issue 3 years ago • 1 comments

RobLoach avatar Jun 16 '22 14:06 RobLoach

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.)

konsumer avatar Jun 16 '22 18:06 konsumer