Skip to content

Commit 9802805

Browse files
committed
deps_cpp_info is only avaible in the build method
1 parent f13f053 commit 9802805

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

recipes/gamenetworkingsockets/all/conanfile.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ def validate(self):
5353
if self.options.encryption == "bcrypt" and self.settings.os != "Windows":
5454
raise ConanInvalidConfiguration("bcrypt is only valid on Windows")
5555

56-
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":
57-
raise ConanInvalidConfiguration("{} requires OpenSSL 1.1.1 or newer".format(self.name))
5856

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

7674
def build(self):
75+
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":
76+
raise ConanInvalidConfiguration("{} requires OpenSSL 1.1.1 or newer".format(self.name))
77+
7778
self._patch_sources()
7879
cmake = self._configure_cmake()
7980
cmake.build()

0 commit comments

Comments
 (0)