Skip to content

Commit

Permalink
hiredis: disable static build on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Sep 21, 2023
1 parent 6a50b7b commit 2f17d9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions recipes/hiredis/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.apple import is_apple_os
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm
from conan.tools.scm import Version
Expand Down Expand Up @@ -48,6 +50,10 @@ def requirements(self):
if self.options.with_ssl:
self.requires("openssl/[>=1.1 <4]")

def validate(self):
if is_apple_os(self) and not self.options.shared:
raise ConanInvalidConfiguration("Static library build is not supported on macOS")

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

Expand Down

0 comments on commit 2f17d9d

Please sign in to comment.