123456789101112131415161718192021222324252627282930313233343536373839404142 |
- project('jp2-pixbuf-loader', 'c', version: '0.0.3')
- gdk_pixbuf = dependency('gdk-pixbuf-2.0', method: 'pkg-config')
- gdk_pixbuf_moduledir = gdk_pixbuf.get_pkgconfig_variable('gdk_pixbuf_moduledir', define_variable: ['prefix', get_option('prefix')])
- gdk_pixbuf_query_loaders = gdk_pixbuf.get_pkgconfig_variable('gdk_pixbuf_query_loaders')
- 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')
- cc = meson.get_compiler('c')
- openjpeg = dependency('libopenjp2', method: 'pkg-config', required: cc.get_argument_syntax() != 'msvc')
- if not openjpeg.found()
- openjpeg = dependency('OpenJPEG', method: 'cmake')
- endif
- if get_option('buildtype') == 'debug'
- add_global_arguments('-DDEBUG=TRUE', language: 'c')
- endif
- pixbuf_loader_openjpeg = shared_module(
- 'pixbufloader-jp2',
- 'src/io-jp2.c',
- include_directories: 'src/',
- dependencies: [gdk_pixbuf, openjpeg],
- name_suffix: host_machine.system() == 'darwin' ? 'so' : [],
- install: true,
- install_dir: gdk_pixbuf_moduledir,
- )
- cdata = configuration_data()
- cdata.set('bindir', get_option('prefix') / get_option('bindir'))
- configure_file(
- input: 'jp2-pixbuf.thumbnailer.in',
- output: 'jp2-pixbuf.thumbnailer',
- configuration: cdata,
- install: true,
- install_dir: get_option('datadir') / 'thumbnailers',
- )
- meson.add_install_script(gdk_pixbuf_query_loaders.path(), '--update-cache')
- subdir('tests')
|