Merge pull request #924 from a17r/0.27-use-libssh-config
0.27: use libssh-config instead of custom FindSSH.cmake
This commit is contained in:
commit
4061111aca
@ -1,31 +0,0 @@
|
||||
# - Find libssh
|
||||
# Find the native SSH headers and libraries.
|
||||
#
|
||||
# SSH_INCLUDE_DIRS - where to find libssh.h, etc.
|
||||
# SSH_LIBRARIES - List of libraries when using libssh.
|
||||
# SSH_FOUND - True if libssh found.
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
# Look for the header file.
|
||||
FIND_PATH(SSH_INCLUDE_DIR NAMES libssh/libssh.h)
|
||||
|
||||
# Look for the library.
|
||||
FIND_LIBRARY(SSH_LIBRARY NAMES ssh libssh)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SSH_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SSH DEFAULT_MSG SSH_LIBRARY SSH_INCLUDE_DIR)
|
||||
|
||||
# Copy the results to the output variables.
|
||||
IF(SSH_FOUND)
|
||||
SET(SSH_LIBRARIES ${SSH_LIBRARY})
|
||||
SET(SSH_INCLUDE_DIRS ${SSH_INCLUDE_DIR})
|
||||
ELSE(SSH_FOUND)
|
||||
SET(SSH_LIBRARIES)
|
||||
SET(SSH_INCLUDE_DIRS)
|
||||
ENDIF(SSH_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(SSH_INCLUDE_DIR SSH_LIBRARY)
|
||||
@ -20,7 +20,7 @@ if( EXIV2_ENABLE_WEBREADY )
|
||||
endif()
|
||||
|
||||
if( EXIV2_ENABLE_SSH )
|
||||
find_package( SSH REQUIRED)
|
||||
find_package(libssh CONFIG REQUIRED)
|
||||
endif( )
|
||||
endif( )
|
||||
|
||||
|
||||
@ -174,8 +174,8 @@ target_include_directories(exiv2lib_int PUBLIC
|
||||
if (EXIV2_ENABLE_WEBREADY)
|
||||
|
||||
if( EXIV2_ENABLE_SSH )
|
||||
target_include_directories(exiv2lib SYSTEM PUBLIC ${SSH_INCLUDE_DIR} )
|
||||
target_link_libraries( exiv2lib PUBLIC ${SSH_LIBRARIES})
|
||||
target_include_directories(exiv2lib SYSTEM PUBLIC ${LIBSSH_INCLUDE_DIR})
|
||||
target_link_libraries(exiv2lib PUBLIC ${LIBSSH_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if( EXIV2_ENABLE_CURL )
|
||||
|
||||
Loading…
Reference in New Issue
Block a user