Skip to content

Commit

Permalink
Use static-library for Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
uilianries authored Nov 15, 2024
1 parent b08331a commit 71394e9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions recipes/libq/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ def layout(self):
def export_sources(self):
export_conandata_patches(self)

def configure(self):
if self.settings.os == "Windows":
self.package_type = "static-library"
del self.options.shared
if self.options.get_safe("shared"):
self.options.rm_safe("fPIC")

def validate(self):
check_min_cppstd(self, 11)
if self.settings.os == "Windows" and self.options.shared:
# It exports no symbols, so it can't be used as a shared library
raise ConanInvalidConfiguration("Does not support shared libraries on Windows")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down

0 comments on commit 71394e9

Please sign in to comment.