From e8c71f1f88c919c9732cc2a5d45b29925d594a6b Mon Sep 17 00:00:00 2001 From: Kris Kwiatkowski Date: Thu, 25 Feb 2021 14:08:44 +0000 Subject: [PATCH] make it compile --- CMakeLists.txt | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8d023c..d2a7388 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,16 +29,17 @@ endif() # Build OpenSSL if not provided, otherwise define # OpenSSL_ssl_shared and OpenSSL_crypto_shared -if (BUILD_OPENSSL) - add_subdirectory(3rd/openssl-cmake) -else() - if (NOT OPENSSL_INSTALL_DIR) - message(FATAL_ERROR "Must specify -DOPENSSL_INSTALL_DIR") - endif() - set(OPENSSL_BUILD_INSTALL_ROOT ${OPENSSL_INSTALL_DIR}) - set(OPENSSL_PREFIX_OPENSSLDIR ${CMAKE_INSTALL_PREFIX}${OPTEE_ENGINE_INSTALL_DIR}/openssl) - include(3rd/openssl-cmake/libdefs.cmake) -endif() +#if (BUILD_OPENSSL) +# add_subdirectory(3rd/openssl-cmake) +#else() +# # if (NOT OPENSSL_INSTALL_DIR) +# # message(FATAL_ERROR "Must specify -DOPENSSL_INSTALL_DIR") +# #endif() +# set(OPENSSL_BUILD_INSTALL_ROOT ${OPENSSL_INSTALL_DIR}) +# set(OPENSSL_PREFIX_OPENSSLDIR ${CMAKE_INSTALL_PREFIX}${OPTEE_ENGINE_INSTALL_DIR}/openssl) +# include(3rd/openssl-cmake/libdefs.cmake) +#endif() +find_package(OpenSSL) get_property(OPENSSL_INSTALL_DIR GLOBAL PROPERTY openssl_build_install_dir_property) set(OPENSSL_INCLUDE_DIR ${OPENSSL_INSTALL_DIR}/include) @@ -132,7 +133,7 @@ target_link_directories( target_link_libraries( optee_eng - OpenSSL_crypto_shared + crypto ${CMAKE_DL_LIBS}) IF(${CMAKE_BUILD_TYPE} MATCHES "Debug")