Skip to content

Commit

Permalink
Attempt to fix windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ericriff committed Sep 17, 2021
1 parent 4a50c9a commit 2ba8574
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion recipes/farmhash/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class farmhashConan(ConanFile):
def _source_subfolder(self):
return "source_subfolder"

@property
def _settings_build(self):
return getattr(self, "settings_build", self.settings)

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
Expand All @@ -37,14 +41,18 @@ def configure(self):
if self.options.shared:
del self.options.fPIC

def build_requirements(self):
if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"):
self.build_requires("msys2/cci.latest")

def source(self):
tools.get(**self.conan_data["sources"][self.version], strip_root=True,
destination=self._source_subfolder)

def _configure_autotools(self):
if self._autotools:
return self._autotools
self._autotools = AutoToolsBuildEnvironment(self)
self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows)
conf_args = []
if self.options.shared:
conf_args.extend(["--enable-shared", "--disable-static"])
Expand Down

0 comments on commit 2ba8574

Please sign in to comment.