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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-12-17 12:00:57 -08:00
parent 88d5fc0fbc
commit 63290e3155

View file

@ -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()