Skip to content

Commit

Permalink
check if defined variables in CMake module file
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm committed Feb 21, 2021
1 parent c5f1d5d commit 761aae3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions recipes/openssl/1.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,30 +766,30 @@ def package(self):
@staticmethod
def _create_cmake_module_variables(module_file):
content = """\
if(OpenSSL_FOUND)
if(DEFINED OpenSSL_FOUND)
set(OPENSSL_FOUND ${OpenSSL_FOUND})
endif()
if(OpenSSL_INCLUDE_DIR)
if(DEFINED OpenSSL_INCLUDE_DIR)
set(OPENSSL_INCLUDE_DIR ${OpenSSL_INCLUDE_DIR})
endif()
if(OpenSSL_Crypto_LIBS)
if(DEFINED OpenSSL_Crypto_LIBS)
set(OPENSSL_CRYPTO_LIBRARY ${OpenSSL_Crypto_LIBS})
set(OPENSSL_CRYPTO_LIBRARIES ${OpenSSL_Crypto_LIBS}
${OpenSSL_Crypto_DEPENDENCIES}
${OpenSSL_Crypto_FRAMEWORKS}
${OpenSSL_Crypto_SYSTEM_LIBS})
endif()
if(OpenSSL_SSL_LIBS)
if(DEFINED OpenSSL_SSL_LIBS)
set(OPENSSL_SSL_LIBRARY ${OpenSSL_SSL_LIBS})
set(OPENSSL_SSL_LIBRARIES ${OpenSSL_SSL_LIBS}
${OpenSSL_SSL_DEPENDENCIES}
${OpenSSL_SSL_FRAMEWORKS}
${OpenSSL_SSL_SYSTEM_LIBS})
endif()
if(OpenSSL_LIBRARIES)
if(DEFINED OpenSSL_LIBRARIES)
set(OPENSSL_LIBRARIES ${OpenSSL_LIBRARIES})
endif()
if(OpenSSL_VERSION)
if(DEFINED OpenSSL_VERSION)
set(OPENSSL_VERSION ${OpenSSL_VERSION})
endif()
"""
Expand Down

0 comments on commit 761aae3

Please sign in to comment.