Skip to content

Commit

Permalink
add conan shared builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Apr 3, 2024
1 parent cbd7264 commit d4897ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ImageMagickDelegates(ConanFile):
settings = 'os', 'compiler', 'build_type', 'arch'

options = {
'libtype': [ 'shared', 'static' ],
'fonts': [ True, False ],
'jpeg': [ True, False ],
'png': [ True, False ],
Expand Down Expand Up @@ -38,6 +39,7 @@ class ImageMagickDelegates(ConanFile):
}

default_options = {
'libtype': 'static',
'fonts': True,
'jpeg': True,
'png': True,
Expand Down Expand Up @@ -68,6 +70,11 @@ class ImageMagickDelegates(ConanFile):
generators = [ 'CMakeDeps', 'CMakeToolchain', 'VCVars' ]

def requirements(self):
if self.options.libtype == 'static':
default_options = { '*:shared': False }
if self.options.libtype == 'shared':
default_options = { '*:shared': True }

# Fonts are not available on WASM targets
if self.options.fonts and self.settings.arch != 'wasm':
[self.requires(x) for x in ('libffi/3.4.4', 'fontconfig/2.14.2', 'freetype/2.13.2', 'fribidi/1.0.12', 'glib/2.78.1', 'harfbuzz/8.3.0')]
Expand Down

0 comments on commit d4897ea

Please # to comment.