From: Michael Wallner Date: Fri, 2 Oct 2020 21:32:51 +0000 (+0200) Subject: Merge branch 'catch' of github.com:m6w6/libmemcached into gh-actions X-Git-Tag: 1.1.0-beta1~236^2~22^2~6 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=d896aed5ccb41cd117c99b4e60cce17d8abf7cc2;p=awesomized%2Flibmemcached Merge branch 'catch' of github.com:m6w6/libmemcached into gh-actions --- d896aed5ccb41cd117c99b4e60cce17d8abf7cc2 diff --cc CMake/CheckDependency.cmake index edcaea4d,1003d68c..862321fb --- a/CMake/CheckDependency.cmake +++ b/CMake/CheckDependency.cmake @@@ -10,34 -39,19 +39,19 @@@ function(check_dependency NAME LIB HEAD if(NOT ${NAME}_FOUND) pkg_check_modules(${NAME} ${LIB}${ARGN}) endif() - set(${NAME} ${${NAME}_FOUND} PARENT_SCOPE) - set(${NAME}_LIBRARIES ${${NAME}_LDFLAGS} PARENT_SCOPE) - set(${NAME}_INCLUDEDIR ${${NAME}_INCLUDEDIR} PARENT_SCOPE) + if(NOT ${NAME}_FOUND) + check_dependency_basic(${NAME} ${LIB} ${HEADER}) - else() ++ else() + set(${NAME} ${${NAME}_FOUND} PARENT_SCOPE) + set(${NAME}_LIBRARIES ${${NAME}_LDFLAGS} PARENT_SCOPE) + set(${NAME}_INCLUDEDIR ${${NAME}_INCLUDEDIR} PARENT_SCOPE) - safe_string(${LIB} LIB_CONST) - set(HAVE_${NAME} ${${NAME}_FOUND} PARENT_SCOPE) - safe_string(${HEADER} HEADER_CONST) - find_path(HAVE_${HEADER_CONST} ${HEADER} PATHS ${${NAME}_INCLUDEDIR}) + safe_string(${LIB} LIB_CONST) + set(HAVE_${NAME} ${${NAME}_FOUND} PARENT_SCOPE) + safe_string(${HEADER} HEADER_CONST) + find_path(HAVE_${HEADER_CONST} ${HEADER} PATHS ${${NAME}_INCLUDEDIR}) + endif() else() - set(FOUND 1) - find_library(LIB${LIB} NAMES ${LIB}) - if(NOT LIB${LIB}) - set(FOUND 0) - endif() - if(HEADER) - safe_string(${HEADER} HEADER_CONST) - check_header(${HEADER}) - if(NOT HAVE_${HEADER_CONST}) - set(FOUND 0) - else() - find_path(${HEADER_CONST}_ROOT ${HEADER}) - if(NOT ${HEADER_CONST}_ROOT) - set(FOUND 0) - endif() - endif() - endif() - set(${NAME} ${FOUND} PARENT_SCOPE) - set(${NAME}_LIBRARIES ${LIB${LIB}} PARENT_SCOPE) - set(${NAME}_INCLUDEDIR ${${HEADER_CONST}_ROOT} PARENT_SCOPE) + check_dependency_basic(${NAME} ${LIB} ${HEADER}) endif() endfunction()