openjpeg: add missing dependencies and optionally disable them (#27904)
* openjpeg: add missing dependencies and optionally disable them * openjpeg: remove variant 'ownlibs' * openjpeg: bugfix Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * openjpeg: do not build CODEC executables by default Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
parent
5d11bc9a77
commit
ee46a1077c
@ -31,7 +31,12 @@ class Openjpeg(CMakePackage):
|
|||||||
version('1.5.2', sha256='3734e95edd0bef6e056815591755efd822228dc3cd866894e00a2c929026b16d')
|
version('1.5.2', sha256='3734e95edd0bef6e056815591755efd822228dc3cd866894e00a2c929026b16d')
|
||||||
version('1.5.1', sha256='6a42fcc23cb179f69a1e94429089e5a5926aee1ffe582a0a6bd91299d297e61a')
|
version('1.5.1', sha256='6a42fcc23cb179f69a1e94429089e5a5926aee1ffe582a0a6bd91299d297e61a')
|
||||||
|
|
||||||
depends_on('zlib')
|
variant('codec', default=False, description='Build the CODEC executables')
|
||||||
|
|
||||||
|
depends_on('zlib', when='+codec')
|
||||||
|
depends_on('libpng', when='+codec')
|
||||||
|
depends_on('libtiff', when='+codec')
|
||||||
|
depends_on('lcms', when='+codec')
|
||||||
|
|
||||||
# The problem with install name of the library on MacOs was fixed starting
|
# The problem with install name of the library on MacOs was fixed starting
|
||||||
# version 2.1.1: https://github.com/uclouvain/openjpeg/commit/b9a247b559e62e55f5561624cf4a19aee3c8afdc
|
# version 2.1.1: https://github.com/uclouvain/openjpeg/commit/b9a247b559e62e55f5561624cf4a19aee3c8afdc
|
||||||
@ -56,3 +61,18 @@ def url_for_version(self, version):
|
|||||||
def libs(self):
|
def libs(self):
|
||||||
return find_libraries('libopenjp{0}'.format(self.version.up_to(1)),
|
return find_libraries('libopenjp{0}'.format(self.version.up_to(1)),
|
||||||
root=self.prefix, recursive=True)
|
root=self.prefix, recursive=True)
|
||||||
|
|
||||||
|
def cmake_args(self):
|
||||||
|
args = [
|
||||||
|
self.define_from_variant('BUILD_CODEC', 'codec'),
|
||||||
|
# MJ2 executables are disabled by default and we just make it
|
||||||
|
# explicit. Note that the executables require additional libraries
|
||||||
|
# as in the case '+codec', therefore, we will need to update the
|
||||||
|
# 'depends_on' directives when/if we introduce a variant that
|
||||||
|
# enables them.
|
||||||
|
self.define('BUILD_MJ2', False),
|
||||||
|
# Note that if the list of dependencies is incomplete, there is
|
||||||
|
# still a chance that the bundled third-party libraries get built.
|
||||||
|
self.define('BUILD_THIRDPARTY', False)
|
||||||
|
]
|
||||||
|
return args
|
||||||
|
Loading…
Reference in New Issue
Block a user