From 9dd0b4dc262159ec0477a1033b4d0c4a6acffb8f Mon Sep 17 00:00:00 2001 From: sbd021 Date: Mon, 21 Sep 2020 14:39:00 +0800 Subject: [PATCH] findagora.cmake --- cmake/Modules/FindAgora.cmake | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/FindAgora.cmake b/cmake/Modules/FindAgora.cmake index edd79255..b2a1add6 100644 --- a/cmake/Modules/FindAgora.cmake +++ b/cmake/Modules/FindAgora.cmake @@ -18,7 +18,7 @@ else() endif() if (PKG_CONFIG_FOUND) - pkg_check_modules(_AGORA QUIET agora agora_rtc_sdk agora_sig_sdk) + pkg_check_modules(_AGORA QUIET agora agora_rtc_sdk agora_sig_sdk libeay32) endif() find_path(AGORA_INCLUDE_DIR @@ -37,7 +37,7 @@ find_path(AGORA_INCLUDE_DIR include) find_library(AGORA_LIB - NAMES ${_AGIRA_LIBRARIES} agora agora_rtc_sdk agora_sig_sdk + NAMES ${_AGORA_LIBRARIES} agora agora_rtc_sdk agora_sig_sdk HINTS ENV agoraPath${_lib_suffix} ENV agoraPath @@ -58,11 +58,28 @@ find_library(AGORA_LIB ../libs${_lib_suffix} ../libs ../bin${_lib_suffix} ../bin) +find_library(OPENSSL_LIB + NAMES ${_OPENSSL_LIBRARIES} libeay32 + HINTS + ENV DepsPath${_lib_suffix} + ENV DepsPath + ${DepsPath${_lib_suffix}} + ${DepsPath} + ${OPENSSL_LIB_DIRS} + PATH_SUFFIXES + lib${_lib_suffix} lib + libs${_lib_suffix} libs + bin${_lib_suffix} bin + ../lib${_lib_suffix} ../lib + ../libs${_lib_suffix} ../libs + ../bin${_lib_suffix} ../bin) + include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Libcurl DEFAULT_MSG AGORA_LIB AGORA_INCLUDE_DIR) +find_package_handle_standard_args(Agora DEFAULT_MSG AGORA_LIB AGORA_INCLUDE_DIR) mark_as_advanced(AGORA_INCLUDE_DIR AGORA_LIB) -if(LIBCURL_FOUND) +if(Agora_FOUND) set(AGORA_INCLUDE_DIRS ${AGORA_INCLUDE_DIR}) set(AGORA_LIB_DIRS ${AGORA_LIB}) + set(OPENSSL_LIB_DIRS ${OPENSSL_LIB}) endif()