meson.build 1.08 KB
Newer Older
1 2
if get_option('glade_catalog')

3 4 5
glade_xml = 'libhandy.xml'
gladeui_dep = dependency('gladeui-2.0')
module_dir = gladeui_dep.get_pkgconfig_variable('moduledir')
Guido Gunther's avatar
Guido Gunther committed
6
dtd = join_paths(meson.current_source_dir(), 'glade-catalog.dtd')
7
glade_catalogdir = gladeui_dep.get_pkgconfig_variable('catalogdir')
8

9 10 11
libglade_hdy_sources = [
  'glade-hdy-header-group.c',
]
12

13 14 15 16
libglade_hdy_deps = [
  libhandy_dep,
  gladeui_dep,
]
17

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
libglade_hdy_args = []
# Our custom glade module
libglade_hdy = shared_library(
  'glade-handy',
  libglade_hdy_sources,
               c_args: libglade_hdy_args,
         dependencies: libglade_hdy_deps,
  include_directories: [ root_inc, src_inc ],
              install: true,
          install_dir: module_dir,
)

# Validate glade catalog
xmllint = find_program('xmllint', required: true)
if xmllint.found()
  custom_target(
    'xmllint',
      build_by_default: true,
      input: glade_xml,
      output: 'doesnotexist',
      command: [xmllint, '--dtdvalid', dtd, '--noout', '@INPUT@'],
39
  )
40 41 42 43
endif

# Install glade catalog
install_data(glade_xml, install_dir: glade_catalogdir)
44 45

endif