meson.build 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. project('jp2-pixbuf-loader', 'c')
  2. gdk_pixbuf = dependency('gdk-pixbuf-2.0', method: 'pkg-config')
  3. gdk_pixbuf_moduledir = gdk_pixbuf.get_pkgconfig_variable('gdk_pixbuf_moduledir', define_variable: ['prefix', get_option('prefix')])
  4. gdk_pixbuf_query_loaders = gdk_pixbuf.get_pkgconfig_variable('gdk_pixbuf_query_loaders')
  5. gdk_pixbuf_query_loaders = find_program(get_option('gdk_pixbuf_query_loaders_path'), gdk_pixbuf_query_loaders, gdk_pixbuf_query_loaders+'-32', gdk_pixbuf_query_loaders+'-64')
  6. openjpeg = dependency('libopenjp2')
  7. if get_option('buildtype') == 'debug'
  8. add_global_arguments('-DDEBUG=TRUE', language: 'c')
  9. endif
  10. pixbuf_loader_openjpeg = shared_library(
  11. 'pixbufloader-jp2',
  12. 'src/io-jp2.c',
  13. include_directories: 'src/',
  14. dependencies: [gdk_pixbuf, openjpeg],
  15. install: true,
  16. install_dir: gdk_pixbuf_moduledir,
  17. )
  18. cdata = configuration_data()
  19. cdata.set('bindir', get_option('prefix') / get_option('bindir'))
  20. configure_file(
  21. input: 'jp2-pixbuf.thumbnailer.in',
  22. output: 'jp2-pixbuf.thumbnailer',
  23. configuration: cdata,
  24. install: true,
  25. install_dir: get_option('datadir') / 'thumbnailers',
  26. )
  27. meson.add_install_script(gdk_pixbuf_query_loaders.path(), '--update-cache')
  28. subdir('tests')