[CMake] cmake - node-gyp

Stéphane Ancelot sancelot at numalliance.com
Wed Jun 27 02:57:02 EDT 2018


Hi,

I am trying to migrate an existing Makefile to cmake that is using node-gyp.


I have had a binding.gyp file that would need being generated with the 
libraries paths aqnd include paths. The problem is that I don't know how 
to do this.

The final binding.gyp file should look as follow :


# flags
# https://gyp.gsrc.io/docs/UserDocumentation.md

{

   "targets": [
     {
       "target_name": "control",
       "sources": [ "./control.cpp","./control_wrap.cpp" ],
       'defines': [
           'SWIG',
           '_GNU_SOURCE',
           '_REENTRANT',
           '__COBALT__'
         ],
       'libraries': [
         '../../IMPORT_EXPORT_UNIX/linux64/import_export_unix.o',
'../../mofilereader.0.1.2/linux64/libmofilereader.0.1.2.a',
           '../../MODULEDATA_UNIX/linux64/moduledata_unix.o',
           ' ../../EVENEMENTS_UNIX/linux64/evenements_unix.o'
         ],
   'ldflags': 
['-Wl,@/nfs/solaris/AFFAIRES_ECLIPSE/DEVELOPPEMENT/DEVELOPPEMENTS_RD/DEBIAN_64BITS/sancelot/KERNEL/TARGET/usr/xenomai-3.0-git/lib64/cobalt.wrappers 
-lalchemy -lcopperplate ',
'-L/nfs/solaris/AFFAIRES_ECLIPSE/DEVELOPPEMENT/DEVELOPPEMENTS_RD/DEBIAN_64BITS/sancelot/KERNEL/TARGET/usr/xenomai-3.0-git/lib64',
   '-lcobalt',
   '-lpthread',
   '-lrt'],
   'cflags!': [ '-fno-exceptions' ,'-fpermissive'],
   'cflags_cc!': [ '-fno-exceptions' ,'-fpermissive'],
    'include_dirs': [
'/nfs/solaris/AFFAIRES_ECLIPSE/DEVELOPPEMENT/DEVELOPPEMENTS_RD/DEBIAN_64BITS/sancelot/KERNEL/TARGET/usr/xenomai-3.0-git/include/cobalt',
'/nfs/solaris/AFFAIRES_ECLIPSE/DEVELOPPEMENT/DEVELOPPEMENTS_RD/DEBIAN_64BITS/sancelot/KERNEL/TARGET/usr/xenomai-3.0-git/include',
     '../INCLUDE_MACHINE',
     '../INCLUDE_COMMUN',
     '../EVENEMENTS_UNIX',
     '../IMPORT_EXPORT_UNIX',
     '../MODULEDATA_UNIX',
     '../LIBDEFAUT',
     '/usr/include/python2.7'
           ],
          }
         ],
}


More information about the CMake mailing list