Skip to content

Commit b3914fe

Browse files
committed
CMakelist ADD compatibility with libssh 0.8.0 and 0.8.1
1 parent da0b619 commit b3914fe

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ endif()
189189
if(ENABLE_SSH)
190190
find_package(LibSSH 0.7.0 REQUIRED)
191191
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNC_ENABLED_SSH")
192-
target_link_libraries(netconf2 "-L${LIBSSH_LIBRARY_DIR}" -lssh -lssh_threads -lcrypt)
192+
if(LibSSH_PACKAGE_FIND_VERSION_MINOR LESS 8)
193+
target_link_libraries(netconf2 "-L${LIBSSH_LIBRARY_DIR}" -lssh -lssh_threads -lcrypt)
194+
else()
195+
target_link_libraries(netconf2 "-L${LIBSSH_LIBRARY_DIR}" -lssh -lcrypt)
196+
endif()
193197
include_directories(${LIBSSH_INCLUDE_DIRS})
194198
endif()
195199

0 commit comments

Comments
 (0)