mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 12:24:58 +00:00
CMake: finding libssh2 should be idempotent
With the current code, running 'cmake .' in an already-configured directory causes the removal of ssh flags passed to the compiler, making it impossible to build with ssh support but by removing CMake's cache. Remove the check for LIBSSH2_LIBRARY and let CMake do the right thing wrt finding the library.
This commit is contained in:
parent
7affc2f7de
commit
d10de8bd8d
@ -148,15 +148,14 @@ ELSE()
|
||||
FILE(GLOB SRC_ZLIB deps/zlib/*.c deps/zlib/*.h)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT LIBSSH2_LIBRARY)
|
||||
FIND_PACKAGE(LIBSSH2 QUIET)
|
||||
ENDIF()
|
||||
FIND_PACKAGE(LIBSSH2 QUIET)
|
||||
IF (LIBSSH2_FOUND)
|
||||
ADD_DEFINITIONS(-DGIT_SSH)
|
||||
INCLUDE_DIRECTORIES(${LIBSSH2_INCLUDE_DIR})
|
||||
SET(SSH_LIBRARIES ${LIBSSH2_LIBRARIES})
|
||||
ENDIF()
|
||||
|
||||
|
||||
# Platform specific compilation flags
|
||||
IF (MSVC)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user