stamp_core_enums = custom_target('stamp-core-enums.h',
  input : [
    files(
      'core-enums.h'
    ),
  ],
  output: [ 'stamp-core-enums.h', ],
  command: [
    mkenums_wrap, perl,
    meson.project_source_root(), meson.current_source_dir(),
    meson.current_build_dir(),
    'core-',
    '#include <gio/gio.h>\n'              +
    '#include "libgimpbase/gimpbase.h"\n',
    '#include "gimp-intl.h"'
  ],
  build_by_default: true
)

appcoremarshal = gnome.genmarshal('gimpmarshal',
  prefix: 'gimp_marshal',
  sources: 'gimpmarshal.list',
  install_header: false,
)

libappcore_sources = [
  'gimp-atomic.c',
  'gimp-batch.c',
  'gimp-cairo.c',
  'gimp-contexts.c',
  'gimp-data-factories.c',
  'gimp-edit.c',
  'gimp-filter-history.c',
  'gimp-gradients.c',
  'gimp-gui.c',
  'gimp-internal-data.c',
  'gimp-memsize.c',
  'gimp-modules.c',
  'gimp-palettes.c',
  'gimp-parallel.cc',
  'gimp-parasites.c',
  'gimp-spawn.c',
  'gimp-tags.c',
  'gimp-templates.c',
  'gimp-transform-resize.c',
  'gimp-transform-3d-utils.c',
  'gimp-transform-utils.c',
  'gimp-units.c',
  'gimp-user-install.c',
  'gimp-utils.c',
  'gimp.c',
  'gimpasync.c',
  'gimpasyncset.c',
  'gimpauxitem.c',
  'gimpauxitemundo.c',
  'gimpbacktrace-linux.c',
  'gimpbacktrace-none.c',
  'gimpbacktrace-windows.c',
  'gimpbezierdesc.c',
  'gimpboundary.c',
  'gimpbrush-boundary.c',
  'gimpbrush-load.c',
  'gimpbrush-mipmap.cc',
  'gimpbrush-save.c',
  'gimpbrush-transform.cc',
  'gimpbrush.c',
  'gimpbrushcache.c',
  'gimpbrushclipboard.c',
  'gimpbrushgenerated-load.c',
  'gimpbrushgenerated-save.c',
  'gimpbrushgenerated.c',
  'gimpbrushpipe-load.c',
  'gimpbrushpipe-save.c',
  'gimpbrushpipe.c',
  'gimpbuffer.c',
  'gimpcancelable.c',
  'gimpchannel-combine.c',
  'gimpchannel-select.c',
  'gimpchannel.c',
  'gimpchannelpropundo.c',
  'gimpchannelundo.c',
  'gimpchunkiterator.c',
  'gimpcontainer-filter.c',
  'gimpcontainer.c',
  'gimpcontext.c',
  'gimpcoords-interpolate.c',
  'gimpcoords.c',
  'gimpcurve-load.c',
  'gimpcurve-map.c',
  'gimpcurve-save.c',
  'gimpcurve.c',
  'gimpdashpattern.c',
  'gimpdata.c',
  'gimpdatafactory.c',
  'gimpdataloaderfactory.c',
  'gimpdisplay.c',
  'gimpdocumentlist.c',
  'gimpdrawable-bucket-fill.c',
  'gimpdrawable-combine.c',
  'gimpdrawable-edit.c',
  'gimpdrawable-equalize.c',
  'gimpdrawable-fill.c',
  'gimpdrawable-filters.c',
  'gimpdrawable-floating-selection.c',
  'gimpdrawable-foreground-extract.c',
  'gimpdrawable-gradient.c',
  'gimpdrawable-histogram.c',
  'gimpdrawable-levels.c',
  'gimpdrawable-offset.c',
  'gimpdrawable-operation.c',
  'gimpdrawable-preview.c',
  'gimpdrawable-shadow.c',
  'gimpdrawable-stroke.c',
  'gimpdrawable-transform.c',
  'gimpdrawable.c',
  'gimpdrawablefilter.c',
  'gimpdrawablefilterundo.c',
  'gimpdrawablemodundo.c',
  'gimpdrawablepropundo.c',
  'gimpdrawablestack.c',
  'gimpdrawableundo.c',
  'gimpdynamics-load.c',
  'gimpdynamics-save.c',
  'gimpdynamics.c',
  'gimpdynamicsoutput.c',
  'gimperror.c',
  'gimpextension-error.c',
  'gimpextension.c',
  'gimpextensionmanager.c',
  'gimpfilloptions.c',
  'gimpfilter.c',
  'gimpfilteredcontainer.c',
  'gimpfilterstack.c',
  'gimpfloatingselectionundo.c',
  'gimpgradient-load.c',
  'gimpgradient-save.c',
  'gimpgradient.c',
  'gimpgrid.c',
  'gimpgrouplayer.c',
  'gimpgrouplayerundo.c',
  'gimpguide.c',
  'gimpguideundo.c',
  'gimphistogram.c',
  'gimpidtable.c',
  'gimpimage-arrange.c',
  'gimpimage-color-profile.c',
  'gimpimage-colormap.c',
  'gimpimage-convert-indexed.c',
  'gimpimage-convert-precision.c',
  'gimpimage-convert-type.c',
  'gimpimage-crop.c',
  'gimpimage-duplicate.c',
  'gimpimage-flip.c',
  'gimpimage-grid.c',
  'gimpimage-guides.c',
  'gimpimage-item-list.c',
  'gimpimage-merge.c',
  'gimpimage-metadata.c',
  'gimpimage-new.c',
  'gimpimage-pick-color.c',
  'gimpimage-pick-item.c',
  'gimpimage-preview.c',
  'gimpimage-quick-mask.c',
  'gimpimage-resize.c',
  'gimpimage-rotate.c',
  'gimpimage-sample-points.c',
  'gimpimage-scale.c',
  'gimpimage-snap.c',
  'gimpimage-symmetry.c',
  'gimpimage-transform.c',
  'gimpimage-undo-push.c',
  'gimpimage-undo.c',
  'gimpimage.c',
  'gimpimagefile.c',
  'gimpimageproxy.c',
  'gimpimageundo.c',
  'gimpitem-exclusive.c',
  'gimpitem-preview.c',
  'gimpitem.c',
  'gimpitemlist.c',
  'gimpitempropundo.c',
  'gimpitemstack.c',
  'gimpitemtree.c',
  'gimpitemundo.c',
  'gimplayer-floating-selection.c',
  'gimplayer-new.c',
  'gimplayer.c',
  'gimplayermask.c',
  'gimplayermaskpropundo.c',
  'gimplayermaskundo.c',
  'gimplayerpropundo.c',
  'gimplayerstack.c',
  'gimplayerundo.c',
  'gimplineart.c',
  'gimplist.c',
  'gimpmaskundo.c',
  'gimpmybrush-load.c',
  'gimpmybrush.c',
  'gimpobject.c',
  'gimpobjectqueue.c',
  'gimppadactions.c',
  'gimppaintinfo.c',
  'gimppalette-import.c',
  'gimppalette-load.c',
  'gimppalette-save.c',
  'gimppalette.c',
  'gimppalettemru.c',
  'gimpparamspecs-desc.c',
  'gimpparamspecs.c',
  'gimpparasitelist.c',
  'gimppattern-load.c',
  'gimppattern-save.c',
  'gimppattern.c',
  'gimppatternclipboard.c',
  'gimppdbprogress.c',
  'gimppickable-auto-shrink.c',
  'gimppickable-contiguous-region.cc',
  'gimppickable.c',
  'gimpprogress.c',
  'gimpprojectable.c',
  'gimpprojection.c',
  'gimpresource.c',
  'gimpsamplepoint.c',
  'gimpsamplepointundo.c',
  'gimpscanconvert.c',
  'gimpselection.c',
  'gimpsettings.c',
  'gimpstrokeoptions.c',
  'gimpsubprogress.c',
  'gimpsymmetry-mandala.c',
  'gimpsymmetry-mirror.c',
  'gimpsymmetry-tiling.c',
  'gimpsymmetry.c',
  'gimptag.c',
  'gimptagcache.c',
  'gimptagged.c',
  'gimptaggedcontainer.c',
  'gimptempbuf.c',
  'gimptemplate.c',
  'gimptilehandlerprojectable.c',
  'gimptoolgroup.c',
  'gimptoolinfo.c',
  'gimptoolitem.c',
  'gimptooloptions.c',
  'gimptoolpreset-load.c',
  'gimptoolpreset-save.c',
  'gimptoolpreset.c',
  'gimptreehandler.c',
  'gimptreeproxy.c',
  'gimptriviallycancelablewaitable.c',
  'gimpuncancelablewaitable.c',
  'gimpundo.c',
  'gimpundostack.c',
  'gimpunit.c',
  'gimpviewable.c',
  'gimpwaitable.c',

  'core-enums.c',
  stamp_core_enums,

  appcoremarshal,
  cursors_sources,
  pickers_sources,
  icons_core_sources,
]

libappcore = static_library('appcore',
  libappcore_sources,
  include_directories: [ rootInclude, rootAppInclude, ],
  c_args: '-DG_LOG_DOMAIN="Gimp-Core"',
  dependencies: [
    cairo,
    gegl,
    gdk_pixbuf,
    libmypaint,
    gexiv2,
    appstream_glib,
    math,
    dl,
    libunwind,
  ],
)
