binding.gyp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
  32. 'CLANG_CXX_LIBRARY': 'libc++',
  33. 'OTHER_LDFLAGS': [],
  34. 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
  35. 'MACOSX_DEPLOYMENT_TARGET': '10.7'
  36. },
  37. 'include_dirs': [
  38. '<!(node -e "require(\'nan\')")',
  39. ],
  40. 'conditions': [
  41. ['libsass_ext == "" or libsass_ext == "no"', {
  42. 'dependencies': [
  43. 'src/libsass.gyp:libsass',
  44. ]
  45. }],
  46. ['libsass_ext == "auto"', {
  47. 'cflags_cc': [
  48. '<!(pkg-config --cflags libsass)',
  49. ],
  50. 'link_settings': {
  51. 'ldflags': [
  52. '<!(pkg-config --libs-only-other --libs-only-L libsass)',
  53. ],
  54. 'libraries': [
  55. '<!(pkg-config --libs-only-l libsass)',
  56. ],
  57. }
  58. }],
  59. ['libsass_ext == "yes"', {
  60. 'cflags_cc': [
  61. '<(libsass_cflags)',
  62. ],
  63. 'link_settings': {
  64. 'ldflags': [
  65. '<(libsass_ldflags)',
  66. ],
  67. 'libraries': [
  68. '<(libsass_library)',
  69. ],
  70. }
  71. }],
  72. ['OS=="win" and MSVS_VERSION == "2015"', {
  73. 'msvs_settings': {
  74. 'VCCLCompilerTool': {
  75. 'AdditionalOptions': [
  76. # disable Thread-Safe "Magic" for local static variables
  77. '/Zc:threadSafeInit-',
  78. ],
  79. },
  80. },
  81. }],
  82. ['OS!="win"', {
  83. 'cflags_cc+': [
  84. '-std=c++0x'
  85. ]
  86. }]
  87. ]
  88. }
  89. ]
  90. }