meson.build 1.92 KB
Newer Older
Salamandar's avatar
Salamandar committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95

modules_deps = [
  gtk3, babl, gegl, math,
]

color_selector_libs = [
  libgimpcolor,
  libgimpconfig,
  libgimpmodule,
  libgimpwidgets,
]
controller_libs = [
  libgimpmodule,
  libgimpwidgets,
]
display_filter_libs = [
  libgimpbase,
  libgimpcolor,
  libgimpconfig,
  libgimpmodule,
  libgimpwidgets,
]

# Name, Sources, deps, link.
modules = [
  {
    'name': 'color-selector-cmyk',
    'link': color_selector_libs,
  }, {
    'name': 'color-selector-water',
    'link': color_selector_libs,
  }, {
    'name': 'color-selector-wheel',
    'srcs': [ 'color-selector-wheel.c', 'gimpcolorwheel.c', ],
    'link': color_selector_libs,
  }, {
    'name': 'display-filter-clip-warning',
    'link': display_filter_libs,
  }, {
    'name': 'display-filter-color-blind',
    'link': display_filter_libs,
  }, {
    'name': 'display-filter-aces-rrt',
    'link': display_filter_libs,
  }, {
    'name': 'display-filter-gamma',
    'link': display_filter_libs,
  }, {
    'name': 'display-filter-high-contrast',
    'link': display_filter_libs,
  },
]

if have_linuxinput
  modules += {
    'name': 'controller-linux-input',
    'srcs': [ 'controller-linux-input.c', 'gimpinputdevicestore-gudev.c', ],
    'deps': gudev,
    'link': controller_libs,
  }
endif

if directx.found()
  modules += {
    'name': 'controller-dx-input',
    'srcs': [ 'controller-dx-dinput.c', 'gimpinputdevicestore-dx.c', ],
    'deps': directx,
    'link': [ controller_libs, '-lrpcrt4', ],
  }
endif

if not platform_windows
  modules += {
    'name': 'controller-midi',
    'deps': alsa,
    'link': controller_libs,
  }
endif


foreach module : modules
  name = module.get('name')
  srcs = module.get('srcs', name + '.c')
  deps = module.get('deps', [])
  link = module.get('link', [])

  library(name,
    srcs,
    include_directories: rootInclude,
    dependencies: modules_deps + [ deps ],
    link_with: link,
    install: true,
    install_dir: gimpplugindir / 'modules',
  )
endforeach