binding.gyp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {
  2. 'variables': {
  3. 'libsass_ext%': '',
  4. },
  5. 'targets': [
  6. {
  7. 'target_name': 'binding',
  8. 'win_delay_load_hook': 'true',
  9. 'sources': [
  10. 'src/binding.cpp',
  11. 'src/create_string.cpp',
  12. 'src/custom_function_bridge.cpp',
  13. 'src/custom_importer_bridge.cpp',
  14. 'src/sass_context_wrapper.cpp',
  15. 'src/sass_types/boolean.cpp',
  16. 'src/sass_types/color.cpp',
  17. 'src/sass_types/error.cpp',
  18. 'src/sass_types/factory.cpp',
  19. 'src/sass_types/list.cpp',
  20. 'src/sass_types/map.cpp',
  21. 'src/sass_types/null.cpp',
  22. 'src/sass_types/number.cpp',
  23. 'src/sass_types/string.cpp'
  24. ],
  25. 'msvs_settings': {
  26. 'VCLinkerTool': {
  27. 'SetChecksum': 'true'
  28. }
  29. },
  30. 'xcode_settings': {
  31. 'OTHER_CPLUSPLUSFLAGS': [
  32. '-std=c++11'
  33. ],
  34. 'OTHER_LDFLAGS': [],
  35. 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
  36. 'MACOSX_DEPLOYMENT_TARGET': '10.7'
  37. },
  38. 'include_dirs': [
  39. '<!(node -e "require(\'nan\')")',
  40. ],
  41. 'conditions': [
  42. ['libsass_ext == "" or libsass_ext == "no"', {
  43. 'dependencies': [
  44. 'src/libsass.gyp:libsass',
  45. ]
  46. }],
  47. ['libsass_ext == "auto"', {
  48. 'cflags_cc': [
  49. '<!(pkg-config --cflags libsass)',
  50. ],
  51. 'link_settings': {
  52. 'ldflags': [
  53. '<!(pkg-config --libs-only-other --libs-only-L libsass)',
  54. ],
  55. 'libraries': [
  56. '<!(pkg-config --libs-only-l libsass)',
  57. ],
  58. }
  59. }],
  60. ['libsass_ext == "yes"', {
  61. 'cflags_cc': [
  62. '<(libsass_cflags)',
  63. ],
  64. 'link_settings': {
  65. 'ldflags': [
  66. '<(libsass_ldflags)',
  67. ],
  68. 'libraries': [
  69. '<(libsass_library)',
  70. ],
  71. }
  72. }],
  73. ['OS=="win" and MSVS_VERSION == "2015"', {
  74. 'msvs_settings': {
  75. 'VCCLCompilerTool': {
  76. 'AdditionalOptions': [
  77. # disable Thread-Safe "Magic" for local static variables
  78. '/Zc:threadSafeInit-',
  79. ],
  80. },
  81. },
  82. }],
  83. ['OS!="win"', {
  84. 'cflags_cc+': [
  85. '-std=c++0x'
  86. ]
  87. }]
  88. ]
  89. }
  90. ]
  91. }