2022-03-24 07:19:27 +00:00
|
|
|
openexr_dep = dependency('OpenEXR', modules: ['OpenEXR::IlmImf'], required: get_option('openexr'))
|
|
|
|
|
2018-12-17 00:11:16 +00:00
|
|
|
if openexr_dep.found()
|
2019-12-01 11:34:05 +00:00
|
|
|
openexr_override_options = []
|
|
|
|
# Older versions of openexr fail to build with -Werror when using GCC >= 9.2
|
|
|
|
# and Clang >= 6 because it uses deprecated C++98 syntax. Explicitly pass
|
|
|
|
# -std=c++98 in those cases. Just checking the openexr version is not enough
|
|
|
|
# because distros (such as Ubuntu 18.04) have backported patches due to which
|
|
|
|
# older openexr versions now require C++11.
|
2019-11-02 15:51:09 +00:00
|
|
|
if openexr_dep.version().version_compare('< 2.4.0')
|
2019-12-01 11:34:05 +00:00
|
|
|
# Check whether using the openexr headers with -Werror causes an error
|
|
|
|
if cxx.has_argument('-Werror') and cxx.check_header('ImfRgbaFile.h', dependencies: openexr_dep)
|
|
|
|
if not cxx.check_header('ImfRgbaFile.h', dependencies: openexr_dep, args: '-Werror')
|
|
|
|
# If setting -std to c++98 fixes it, use that! Else, warn.
|
|
|
|
if cxx.check_header('ImfRgbaFile.h', dependencies: openexr_dep, args: ['-Werror', '-std=c++98'])
|
|
|
|
openexr_override_options = ['cpp_std=c++98']
|
|
|
|
else
|
|
|
|
warning('openexr headers can\'t be included with \'-Werror\', and no workaround found')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2019-11-02 15:51:09 +00:00
|
|
|
endif
|
|
|
|
|
2018-12-17 00:11:16 +00:00
|
|
|
gstopenexr = library('gstopenexr',
|
|
|
|
'gstopenexr.c',
|
|
|
|
'gstopenexrdec.cpp',
|
|
|
|
c_args: gst_plugins_bad_args,
|
2019-12-01 11:34:05 +00:00
|
|
|
cpp_args: gst_plugins_bad_args,
|
2018-12-17 00:11:16 +00:00
|
|
|
link_args: noseh_link_args,
|
|
|
|
include_directories: [configinc, libsinc],
|
|
|
|
dependencies: [gstvideo_dep, openexr_dep],
|
2019-12-01 11:34:05 +00:00
|
|
|
override_options: openexr_override_options,
|
2018-12-17 00:11:16 +00:00
|
|
|
install: true,
|
|
|
|
install_dir: plugins_install_dir,
|
|
|
|
)
|
2019-05-29 10:28:00 +00:00
|
|
|
plugins += [gstopenexr]
|
2018-12-17 00:11:16 +00:00
|
|
|
endif
|