camera_sources = [
  'components/gallery.vala',
  'components/gallery-button.vala',
  'components/gallery-page.vala',
  'components/shutter-button.vala',
  'components/tween.vala',
  'containers/controls-container.vala',
  'containers/controls-overlay.vala',
  'containers/layer-container.vala',
  'containers/utils.vala',
  'build-info.vala',
  'controls.vala',
  'controls-group.vala',
  'main.vala',
  'utils.vala',
  'window.vala',
]

cc = meson.get_compiler('c')

camera_deps = [
  dependency('gio-2.0', version: '>= 2.50'),
  dependency('gtk+-3.0', version: '>= 3.22'),
  dependency('libhandy-1'),
  dependency('aperture-0', version: '>= 0.1'),
  cc.find_library('m', required: false)
]

camera_sources += camera_gresources

commit_hash = run_command('git', ['rev-parse', '--short=8', 'HEAD']).stdout().strip()
camera_c_args = [
  '-DHANDY_USE_UNSTABLE_API',
  '-DCAMERA_APPLICATION_ID="@0@"'.format(application_id),
  '-DCAMERA_BUILD_VERSION="@0@"'.format(meson.project_version()),
  '-DCAMERA_BUILD_COMMIT="@0@"'.format(commit_hash),
  '-DLOCALEDIR="@0@"'.format(localedir),
  '-DGETTEXT_PACKAGE="net.flyingpimonster.Camera"',
]

executable(executable_name, camera_sources,
  dependencies: camera_deps,
  c_args: camera_c_args,
  # FIXME: Disable once libhandy 1.0 is released
  vala_args: [ '--disable-since-check' ],
  install: true,
)

