Skip to content

Commit

Permalink
deps_cpp_info is only avaible in the build method
Browse files Browse the repository at this point in the history
  • Loading branch information
TheClonerx committed Oct 11, 2021
1 parent f13f053 commit 9802805
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions recipes/gamenetworkingsockets/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def validate(self):
if self.options.encryption == "bcrypt" and self.settings.os != "Windows":
raise ConanInvalidConfiguration("bcrypt is only valid on Windows")

if self.options.encryption == "openssl" and "openssl" in self.deps_cpp_info.deps and tools.Version(self.deps_cpp_info["openssl"].version) < "1.1.1":
raise ConanInvalidConfiguration("{} requires OpenSSL 1.1.1 or newer".format(self.name))

def build_requirements(self):
self.build_requires("protobuf/3.17.1")
Expand All @@ -74,6 +72,9 @@ def _patch_sources(self):
tools.patch(**patch)

def build(self):
if self.options.encryption == "openssl" and "openssl" in self.deps_cpp_info.deps and tools.Version(self.deps_cpp_info["openssl"].version) < "1.1.1":
raise ConanInvalidConfiguration("{} requires OpenSSL 1.1.1 or newer".format(self.name))

self._patch_sources()
cmake = self._configure_cmake()
cmake.build()
Expand Down

0 comments on commit 9802805

Please sign in to comment.