From 566c458b887742abf44d734ecd18412048532726 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 6 Sep 2024 00:51:36 +0900 Subject: [PATCH] support msvc shared build --- recipes/lunasvg/all/conanfile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/lunasvg/all/conanfile.py b/recipes/lunasvg/all/conanfile.py index e2d264c8bbac5..506e7a96fe3bc 100644 --- a/recipes/lunasvg/all/conanfile.py +++ b/recipes/lunasvg/all/conanfile.py @@ -90,7 +90,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_SHARED_LIBS"] = self.options.shared - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + if Version(self.version) < "2.4.1": + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True tc.generate() tc = CMakeDeps(self) @@ -111,3 +112,5 @@ def package_info(self): self.cpp_info.libs = ["lunasvg"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["m"] + if Version(self.version) >= "2.4.1" and not self.options.shared: + self.cpp_info.defines = ["LUNASVG_BUILD_STATIC"]