summaryrefslogtreecommitdiff
blob: 77ce1cdafa14d8442dc0bd83c786a2f4ff1edbe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Index: csync-0.50.0/cmake/Modules/FindLibSSH.cmake
===================================================================
--- csync-0.50.0.orig/cmake/Modules/FindLibSSH.cmake
+++ csync-0.50.0/cmake/Modules/FindLibSSH.cmake
@@ -20,7 +20,7 @@ else (LIBSSH_LIBRARIES AND LIBSSH_INCLUD
 
   find_path(LIBSSH_INCLUDE_DIR
     NAMES
-      libssh/libssh.h
+      libssh/libssh_version.h
     PATHS
       /usr/include
       /usr/local/include
@@ -58,15 +58,15 @@ else (LIBSSH_LIBRARIES AND LIBSSH_INCLUD
     )
 
     if (LibSSH_FIND_VERSION)
-      file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MAJOR
+      file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h LIBSSH_VERSION_MAJOR
         REGEX "#define[ ]+LIBSSH_VERSION_MAJOR[ ]+[0-9]+")
       # Older versions of libssh like libssh-0.2 have LIBSSH_VERSION but not LIBSSH_VERSION_MAJOR
       if (LIBSSH_VERSION_MAJOR)
         string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MAJOR ${LIBSSH_VERSION_MAJOR})
-	file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MINOR
+	file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h LIBSSH_VERSION_MINOR
           REGEX "#define[ ]+LIBSSH_VERSION_MINOR[ ]+[0-9]+")
 	string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MINOR ${LIBSSH_VERSION_MINOR})
-	file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_PATCH
+	file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h LIBSSH_VERSION_PATCH
           REGEX "#define[ ]+LIBSSH_VERSION_MICRO[ ]+[0-9]+")
 	string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_PATCH ${LIBSSH_VERSION_PATCH})
 
@@ -75,7 +75,7 @@ else (LIBSSH_LIBRARIES AND LIBSSH_INCLUD
 	include(FindPackageVersionCheck)
 	find_package_version_check(LibSSH DEFAULT_MSG)
       else (LIBSSH_VERSION_MAJOR)
-        message(STATUS "LIBSSH_VERSION_MAJOR not found in ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h, assuming libssh is too old")
+        message(STATUS "LIBSSH_VERSION_MAJOR not found in ${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h, assuming libssh is too old")
         set(LIBSSH_FOUND FALSE)
       endif (LIBSSH_VERSION_MAJOR)
     endif (LibSSH_FIND_VERSION)