Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. import org.gradle.language.cacheable.*
  2.  
  3. apply plugin: 'base'
  4.  
  5. def pangoIncludes = ['/usr/local/Cellar/glib/2.52.3/include/glib-2.0',
  6. '/usr/local/Cellar/glib/2.52.3/lib/glib-2.0/include',
  7. '/usr/local/opt/gettext/include',
  8. '/usr/local/Cellar/pcre/8.41/include',
  9. '/usr/local/Cellar/cairo/1.14.10/include/cairo',
  10. '/usr/local/Cellar/glib/2.52.3/include/glib-2.0',
  11. '/usr/local/Cellar/glib/2.52.3/lib/glib-2.0/include',
  12. '/usr/local/opt/gettext/include',
  13. '/usr/local/Cellar/pcre/8.41/include',
  14. '/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1',
  15. '/usr/local/Cellar/fontconfig/2.12.4/include',
  16. '/usr/local/opt/freetype/include/freetype2',
  17. '/usr/local/Cellar/libpng/1.6.31/include/libpng16',
  18. '/usr/local/Cellar/harfbuzz/1.4.8_1/include/harfbuzz',
  19. '/usr/local/Cellar/glib/2.52.3/include/glib-2.0',
  20. '/usr/local/Cellar/glib/2.52.3/lib/glib-2.0/include',
  21. '/usr/local/opt/gettext/include',
  22. '/usr/local/Cellar/pcre/8.41/include',
  23. '/usr/local/Cellar/graphite2/1.3.10/include',
  24. '/usr/local/opt/freetype/include/freetype2',
  25. '/usr/local/Cellar/fontconfig/2.12.4/include',
  26. '/usr/local/opt/freetype/include/freetype2'].collect { new File(it) } + rootDir + file('pango')
  27.  
  28. tasks.withType(AbstractNativeTask) {
  29. includeRoots += pangoIncludes
  30. gccExecutable = new File("/usr/bin/clang++")
  31. }
  32.  
  33. task discoverInputs(type: PreprocessWithDepFiles) {
  34. source = fileTree('pango') {
  35. exclude "*win32*"
  36. exclude "*xft*"
  37. include "break-*"
  38. }
  39. dependencyFile = new File(buildDir, 'discoveredInputs.out')
  40. }
  41.  
  42. task compile(type: CompileNative) {
  43. source = fileTree('pango') {
  44. exclude "*win32*"
  45. exclude "*xft*"
  46. include "break-*"
  47. }
  48. dependsOn(discoverInputs)
  49. dependencyFile = discoverInputs.dependencyFile
  50. outputDir = new File(buildDir, 'compiled')
  51. }
  52.  
  53.  
  54. task preprocess(type: PreprocessNative) {
  55. source = fileTree('pango') {
  56. exclude "*win32*"
  57. exclude "*xft*"
  58. include "break-*"
  59. }
  60. preprocessedSourcesDir = new File(buildDir, 'preprocessed')
  61. }
  62.  
  63. task compilePreprocessed(type: CompileNative) {
  64. includeRoots = []
  65. source = preprocess.outputs
  66. outputDir = new File(buildDir, 'compiled')
  67. }
  68.  
  69. task discoverInputsViaParser(type: DiscoverInputsForCompilation) {
  70. source = fileTree('pango') {
  71. exclude "*win32*"
  72. exclude "*xft*"
  73. include "break-*"
  74. }
  75. dependencyFile = new File(buildDir, 'discoveredInputsViaParser.out')
  76. }
  77.  
  78. task compileParser(type: CompileNative) {
  79. source = fileTree('pango') {
  80. exclude "*win32*"
  81. exclude "*xft*"
  82. include "break-*"
  83. }
  84. dependsOn(discoverInputsViaParser)
  85. dependencyFile = discoverInputsViaParser.dependencyFile
  86. outputDir = new File(buildDir, 'compiledViaParser')
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement