Skip to content

Commit

Permalink
support msvc shared build
Browse files Browse the repository at this point in the history
  • Loading branch information
toge committed Sep 5, 2024
1 parent f837475 commit 566c458
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion recipes/lunasvg/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"]

0 comments on commit 566c458

Please sign in to comment.