From 63290e31551329d27846b2fb06010b802cbb8264 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 17 Dec 2015 12:00:57 -0800 Subject: Cmake: fix variable name case confusion I don't know why on one of my Macs (running El Capitan, XCode 7.2, cmake 3.4.1) I get Libssh2_FOUND instead of LIBSSH2_FOUND, but this hack works around the problem. Signed-off-by: Dirk Hohndel --- cmake/Modules/HandleFindGit2.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmake/Modules') diff --git a/cmake/Modules/HandleFindGit2.cmake b/cmake/Modules/HandleFindGit2.cmake index 2f88b36dd..875d0a5b6 100644 --- a/cmake/Modules/HandleFindGit2.cmake +++ b/cmake/Modules/HandleFindGit2.cmake @@ -19,6 +19,10 @@ else() if ("${LIBSSH2_VERSION}" STRGREATER "1.6.1") set(LIBSSH2_LIBRARIES Libssh2::libssh2) endif() + # at least on my Mac I get the mixed case variable instead... + if(Libssh2_FOUND) + set(LIBSSH2_FOUND ${Libssh2_FOUND}) + endif() if(!LIBSSH2_FOUND OR "${LIBSSH2_FOUND}" STREQUAL "") pkg_config_library(LIBSSH2 libssh2 REQUIRED) endif() -- cgit v1.2.3-70-g09d2