From d4897ea5e19e0bac6178d641fa1fabfb45c8f56a Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Wed, 3 Apr 2024 17:37:43 +0200 Subject: [PATCH] add conan shared builds --- conanfile.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/conanfile.py b/conanfile.py index 76e36cdba90..8c01fd3c172 100644 --- a/conanfile.py +++ b/conanfile.py @@ -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 ], @@ -38,6 +39,7 @@ class ImageMagickDelegates(ConanFile): } default_options = { + 'libtype': 'static', 'fonts': True, 'jpeg': True, 'png': True, @@ -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')]