Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
0a3a220f
Commit
0a3a220f
authored
Sep 14, 2021
by
Laurent Stacul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Discover libssh2 without pkg-config
parent
f1b89a20
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
cmake/FindLibSSH2.cmake
+13
-0
src/CMakeLists.txt
+7
-0
No files found.
cmake/FindLibSSH2.cmake
0 → 100644
View file @
0a3a220f
# LIBSSH2_FOUND - system has the libssh2 library
# LIBSSH2_INCLUDE_DIR - the libssh2 include directory
# LIBSSH2_LIBRARY - the libssh2 library name
FIND_PATH
(
LIBSSH2_INCLUDE_DIR libssh2.h
)
FIND_LIBRARY
(
LIBSSH2_LIBRARY NAMES ssh2 libssh2
)
INCLUDE
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
LibSSH2
REQUIRED_VARS LIBSSH2_LIBRARY LIBSSH2_INCLUDE_DIR
)
MARK_AS_ADVANCED
(
LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY
)
src/CMakeLists.txt
View file @
0a3a220f
...
@@ -232,6 +232,13 @@ ENDIF()
...
@@ -232,6 +232,13 @@ ENDIF()
# Optional external dependency: libssh2
# Optional external dependency: libssh2
IF
(
USE_SSH
)
IF
(
USE_SSH
)
FIND_PKGLIBRARIES
(
LIBSSH2 libssh2
)
FIND_PKGLIBRARIES
(
LIBSSH2 libssh2
)
IF
(
NOT LIBSSH2_FOUND
)
FIND_PACKAGE
(
LibSSH2
)
SET
(
LIBSSH2_INCLUDE_DIRS
${
LIBSSH2_INCLUDE_DIR
}
)
GET_FILENAME_COMPONENT
(
LIBSSH2_LIBRARY_DIRS
"
${
LIBSSH2_LIBRARY
}
"
DIRECTORY
)
SET
(
LIBSSH2_LIBRARIES
${
LIBSSH2_LIBRARY
}
)
SET
(
LIBSSH2_LDFLAGS
"-lssh2"
)
ENDIF
()
ENDIF
()
ENDIF
()
IF
(
LIBSSH2_FOUND
)
IF
(
LIBSSH2_FOUND
)
SET
(
GIT_SSH 1
)
SET
(
GIT_SSH 1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment