diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index c858b3551b71d..2e74848de90c7 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -590,12 +590,12 @@ def _create_cmake_module_variables(self, module_file): ${OpenSSL_Crypto_DEPENDENCIES} ${OpenSSL_Crypto_FRAMEWORKS} ${OpenSSL_Crypto_SYSTEM_LIBS}) - elseif(DEFINED openssl_OpenSSL_Crypto_LIBS_%(config)s) - set(OPENSSL_CRYPTO_LIBRARY ${openssl_OpenSSL_Crypto_LIBS_%(config)s}) - set(OPENSSL_CRYPTO_LIBRARIES ${openssl_OpenSSL_Crypto_LIBS_%(config)s} - ${openssl_OpenSSL_Crypto_DEPENDENCIES_%(config)s} - ${openssl_OpenSSL_Crypto_FRAMEWORKS_%(config)s} - ${openssl_OpenSSL_Crypto_SYSTEM_LIBS_%(config)s}) + elseif(DEFINED %(package_name)s_OpenSSL_Crypto_LIBS_%(config)s) + set(OPENSSL_CRYPTO_LIBRARY ${%(package_name)s_OpenSSL_Crypto_LIBS_%(config)s}) + set(OPENSSL_CRYPTO_LIBRARIES ${%(package_name)s_OpenSSL_Crypto_LIBS_%(config)s} + ${%(package_name)s_OpenSSL_Crypto_DEPENDENCIES_%(config)s} + ${%(package_name)s_OpenSSL_Crypto_FRAMEWORKS_%(config)s} + ${%(package_name)s_OpenSSL_Crypto_SYSTEM_LIBS_%(config)s}) endif() if(DEFINED OpenSSL_SSL_LIBS) set(OPENSSL_SSL_LIBRARY ${OpenSSL_SSL_LIBS}) @@ -603,12 +603,12 @@ def _create_cmake_module_variables(self, module_file): ${OpenSSL_SSL_DEPENDENCIES} ${OpenSSL_SSL_FRAMEWORKS} ${OpenSSL_SSL_SYSTEM_LIBS}) - elseif(DEFINED openssl_OpenSSL_SSL_LIBS_%(config)s) - set(OPENSSL_SSL_LIBRARY ${openssl_OpenSSL_SSL_LIBS_%(config)s}) - set(OPENSSL_SSL_LIBRARIES ${openssl_OpenSSL_SSL_LIBS_%(config)s} - ${openssl_OpenSSL_SSL_DEPENDENCIES_%(config)s} - ${openssl_OpenSSL_SSL_FRAMEWORKS_%(config)s} - ${openssl_OpenSSL_SSL_SYSTEM_LIBS_%(config)s}) + elseif(DEFINED %(package_name)s_OpenSSL_SSL_LIBS_%(config)s) + set(OPENSSL_SSL_LIBRARY ${%(package_name)s_OpenSSL_SSL_LIBS_%(config)s}) + set(OPENSSL_SSL_LIBRARIES ${%(package_name)s_OpenSSL_SSL_LIBS_%(config)s} + ${%(package_name)s_OpenSSL_SSL_DEPENDENCIES_%(config)s} + ${%(package_name)s_OpenSSL_SSL_FRAMEWORKS_%(config)s} + ${%(package_name)s_OpenSSL_SSL_SYSTEM_LIBS_%(config)s}) endif() if(DEFINED OpenSSL_LIBRARIES) set(OPENSSL_LIBRARIES ${OpenSSL_LIBRARIES}) @@ -616,7 +616,7 @@ def _create_cmake_module_variables(self, module_file): if(DEFINED OpenSSL_VERSION) set(OPENSSL_VERSION ${OpenSSL_VERSION}) endif() - """% {"config":str(self.settings.build_type).upper()}) + """% {"config":str(self.settings.build_type).upper(), "package_name":self.name}) save(self, module_file, content) @property diff --git a/recipes/openssl/3.x.x/test_package/conanfile.py b/recipes/openssl/3.x.x/test_package/conanfile.py index 76d2cc26c1df0..0dc8825448944 100644 --- a/recipes/openssl/3.x.x/test_package/conanfile.py +++ b/recipes/openssl/3.x.x/test_package/conanfile.py @@ -16,15 +16,15 @@ def requirements(self): self.requires(self.tested_reference_str) def _with_legacy(self): - return (not self.dependencies["openssl"].options.no_legacy and - ((not self.dependencies["openssl"].options.no_md4) or - (not self.dependencies["openssl"].options.no_rmd160))) + return (not self.dependencies[self.tested_reference_str].options.no_legacy and + ((not self.dependencies[self.tested_reference_str].options.no_md4) or + (not self.dependencies[self.tested_reference_str].options.no_rmd160))) def generate(self): tc = CMakeToolchain(self) tc.cache_variables["OPENSSL_WITH_LEGACY"] = self._with_legacy() - tc.cache_variables["OPENSSL_WITH_MD4"] = not self.dependencies["openssl"].options.no_md4 - tc.cache_variables["OPENSSL_WITH_RIPEMD160"] = not self.dependencies["openssl"].options.no_rmd160 + tc.cache_variables["OPENSSL_WITH_MD4"] = not self.dependencies[self.tested_reference_str].options.no_md4 + tc.cache_variables["OPENSSL_WITH_RIPEMD160"] = not self.dependencies[self.tested_reference_str].options.no_rmd160 tc.generate() def build(self):