]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: Improve libssh2 check on Windows
authornicoguillier <59726521+nicoguillier@users.noreply.github.com>
Fri, 10 Jan 2020 08:57:38 +0000 (09:57 +0100)
committerJay Satiro <raysatiro@yahoo.com>
Sat, 11 Jan 2020 23:53:32 +0000 (18:53 -0500)
- Add "libssh2" name to FindLibSSH2 library search.

On Windows systems, libSSH2 CMake installation may name the library
"LibSSH2".

Prior to this change cmake only checked for name "ssh2". On Linux that
works fine because it will prepend the "lib", but it doesn't do that on
Windows.

Closes https://github.com/curl/curl/pull/4804

CMake/FindLibSSH2.cmake

index 84822dba74d7bec17da318b46fa602cf860a5d12..0d6219425e46271ab3ad6d13f23c3b92f4128e45 100644 (file)
@@ -12,7 +12,7 @@ endif()
 find_path(LIBSSH2_INCLUDE_DIR libssh2.h
 )
 
-find_library(LIBSSH2_LIBRARY NAMES ssh2
+find_library(LIBSSH2_LIBRARY NAMES ssh2 libssh2
 )
 
 if(LIBSSH2_INCLUDE_DIR)