• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1openjpeg_sources = [
2  'gstopenjpeg.c',
3  'gstopenjpegdec.c',
4  'gstopenjpegenc.c',
5]
6
7openjpeg_cargs = []
8
9if get_option('openjpeg').disabled()
10  subdir_done()
11endif
12
13openjpeg_dep = dependency('libopenjp2', version : '>=2.1', required : false)
14if not openjpeg_dep.found()
15  # Fallback to v1.5
16  openjpeg_dep = dependency('libopenjpeg1', required : false)
17  openjpeg_cargs += ['-DHAVE_OPENJPEG_1']
18endif
19if not openjpeg_dep.found() and get_option('openjpeg').enabled()
20  error('openjpeg plugin enabled, but neither libopenjp2 nor libopenjpeg1 not found')
21endif
22
23if openjpeg_dep.found()
24  gstopenjpeg = library('gstopenjpeg',
25    openjpeg_sources,
26    c_args : gst_plugins_bad_args + openjpeg_cargs,
27    link_args : noseh_link_args,
28    include_directories : [configinc],
29    dependencies : [gst_dep, gstvideo_dep, openjpeg_dep,
30		    gstcodecparsers_dep],
31    install : true,
32    install_dir : plugins_install_dir,
33  )
34  pkgconfig.generate(gstopenjpeg, install_dir : plugins_pkgconfig_install_dir)
35endif
36