Turn audio into a shareable video. forked from nypublicradio/audiogram

binding.gyp 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. {
  2. 'conditions': [
  3. ['OS=="win"', {
  4. 'variables': {
  5. 'GTK_Root%': 'C:/GTK', # Set the location of GTK all-in-one bundle
  6. 'with_jpeg%': 'false',
  7. 'with_gif%': 'false'
  8. }
  9. }, { # 'OS!="win"'
  10. 'variables': {
  11. 'with_jpeg%': '<!(./util/has_lib.sh jpeg)',
  12. 'with_gif%': '<!(./util/has_lib.sh gif)'
  13. }
  14. }]
  15. ],
  16. 'targets': [
  17. {
  18. 'target_name': 'canvas-postbuild',
  19. 'dependencies': ['canvas'],
  20. 'conditions': [
  21. ['OS=="win"', {
  22. 'copies': [{
  23. 'destination': '<(PRODUCT_DIR)',
  24. 'files': [
  25. '<(GTK_Root)/bin/zlib1.dll',
  26. '<(GTK_Root)/bin/libintl-8.dll',
  27. '<(GTK_Root)/bin/libpng14-14.dll',
  28. '<(GTK_Root)/bin/libpangocairo-1.0-0.dll',
  29. '<(GTK_Root)/bin/libpango-1.0-0.dll',
  30. '<(GTK_Root)/bin/libpangoft2-1.0-0.dll',
  31. '<(GTK_Root)/bin/libpangowin32-1.0-0.dll',
  32. '<(GTK_Root)/bin/libcairo-2.dll',
  33. '<(GTK_Root)/bin/libfontconfig-1.dll',
  34. '<(GTK_Root)/bin/libfreetype-6.dll',
  35. '<(GTK_Root)/bin/libglib-2.0-0.dll',
  36. '<(GTK_Root)/bin/libgobject-2.0-0.dll',
  37. '<(GTK_Root)/bin/libgmodule-2.0-0.dll',
  38. '<(GTK_Root)/bin/libgthread-2.0-0.dll',
  39. '<(GTK_Root)/bin/libexpat-1.dll'
  40. ]
  41. }]
  42. }]
  43. ]
  44. },
  45. {
  46. 'target_name': 'canvas',
  47. 'include_dirs': ["<!(node -e \"require('nan')\")"],
  48. 'sources': [
  49. 'src/Canvas.cc',
  50. 'src/CanvasGradient.cc',
  51. 'src/CanvasPattern.cc',
  52. 'src/CanvasRenderingContext2d.cc',
  53. 'src/color.cc',
  54. 'src/Image.cc',
  55. 'src/ImageData.cc',
  56. 'src/register_font.cc',
  57. 'src/init.cc'
  58. ],
  59. 'conditions': [
  60. ['OS=="win"', {
  61. 'libraries': [
  62. '-l<(GTK_Root)/lib/cairo.lib',
  63. '-l<(GTK_Root)/lib/libpng.lib',
  64. '-l<(GTK_Root)/lib/pangocairo-1.0.lib',
  65. '-l<(GTK_Root)/lib/pango-1.0.lib',
  66. '-l<(GTK_Root)/lib/freetype.lib',
  67. '-l<(GTK_Root)/lib/glib-2.0.lib',
  68. '-l<(GTK_Root)/lib/gobject-2.0.lib'
  69. ],
  70. 'include_dirs': [
  71. '<(GTK_Root)/include',
  72. '<(GTK_Root)/include/cairo',
  73. '<(GTK_Root)/include/pango-1.0',
  74. '<(GTK_Root)/include/glib-2.0',
  75. '<(GTK_Root)/include/freetype2',
  76. '<(GTK_Root)/lib/glib-2.0/include'
  77. ],
  78. 'defines': [
  79. '_USE_MATH_DEFINES' # for M_PI
  80. ],
  81. 'configurations': {
  82. 'Debug': {
  83. 'msvs_settings': {
  84. 'VCCLCompilerTool': {
  85. 'WarningLevel': 4,
  86. 'ExceptionHandling': 1,
  87. 'DisableSpecificWarnings': [4100, 4127, 4201, 4244, 4267, 4506, 4611, 4714, 4512]
  88. }
  89. }
  90. },
  91. 'Release': {
  92. 'msvs_settings': {
  93. 'VCCLCompilerTool': {
  94. 'WarningLevel': 4,
  95. 'ExceptionHandling': 1,
  96. 'DisableSpecificWarnings': [4100, 4127, 4201, 4244, 4267, 4506, 4611, 4714, 4512]
  97. }
  98. }
  99. }
  100. }
  101. }, { # 'OS!="win"'
  102. 'libraries': [
  103. '<!@(pkg-config pixman-1 --libs)',
  104. '<!@(pkg-config cairo --libs)',
  105. '<!@(pkg-config libpng --libs)',
  106. '<!@(pkg-config pangocairo --libs)',
  107. '<!@(pkg-config freetype2 --libs)'
  108. ],
  109. 'include_dirs': [
  110. '<!@(pkg-config cairo --cflags-only-I | sed s/-I//g)',
  111. '<!@(pkg-config libpng --cflags-only-I | sed s/-I//g)',
  112. '<!@(pkg-config pangocairo --cflags-only-I | sed s/-I//g)',
  113. '<!@(pkg-config freetype2 --cflags-only-I | sed s/-I//g)'
  114. ]
  115. }],
  116. ['with_jpeg=="true"', {
  117. 'defines': [
  118. 'HAVE_JPEG'
  119. ],
  120. 'conditions': [
  121. ['OS=="win"', {
  122. 'libraries': [
  123. '-l<(GTK_Root)/lib/jpeg.lib'
  124. ]
  125. }, {
  126. 'libraries': [
  127. '-ljpeg'
  128. ]
  129. }]
  130. ]
  131. }],
  132. ['with_gif=="true"', {
  133. 'defines': [
  134. 'HAVE_GIF'
  135. ],
  136. 'conditions': [
  137. ['OS=="win"', {
  138. 'libraries': [
  139. '-l<(GTK_Root)/lib/gif.lib'
  140. ]
  141. }, {
  142. 'libraries': [
  143. '-lgif'
  144. ]
  145. }]
  146. ]
  147. }]
  148. ]
  149. }
  150. ]
  151. }