I am trying to integrate the Node.js addon into an existing build system based on CMake. Building addon requires a large number of macro preprocessor macros and library dependencies available in the context of CMake. I would like to be able to pass them to node-gyp when it is called by CMake. Unfortunately, I could not find an easy way to do this.
I tried using the approach used for plain old gyp as follows:
node-gyp configure -d -DPOSIX=1
but the -D option does not seem to be passed to node-gyp . Considering the source of node-gyp , this is not entirely surprising. Is there a direct, direct way to do this, or am I obsessed with programmatically creating entries in binding.gyp , pulling this information from the environment or something else along these lines?
source share