mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
cmake: remove "embedded libssh2"
Compiling libssh2 into libgit2 directly is madness. If users want to create a single library that contains libssh2, then they should link a static library.
This commit is contained in:
@@ -74,10 +74,6 @@ if(MSVC)
|
||||
# This option must match the settings used in your program, in particular if you
|
||||
# are linking statically
|
||||
option(STATIC_CRT "Link the static CRT libraries" ON)
|
||||
|
||||
# If you want to embed a copy of libssh2 into libgit2, pass a
|
||||
# path to libssh2
|
||||
option(EMBED_SSH_PATH "Path to libssh2 to embed (Windows)" OFF)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
@@ -27,15 +27,6 @@ elseif(USE_SSH STREQUAL ON OR USE_SSH STREQUAL "libssh2")
|
||||
set(GIT_SSH_LIBSSH2_MEMORY_CREDENTIALS 1)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND EMBED_SSH_PATH)
|
||||
file(GLOB SSH_SRC "${EMBED_SSH_PATH}/src/*.c")
|
||||
list(SORT SSH_SRC)
|
||||
list(APPEND LIBGIT2_DEPENDENCY_OBJECTS ${SSH_SRC})
|
||||
|
||||
list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${EMBED_SSH_PATH}/include")
|
||||
file(WRITE "${EMBED_SSH_PATH}/src/libssh2_config.h" "#define HAVE_WINCNG\n#define LIBSSH2_WINCNG\n#include \"../win32/libssh2_config.h\"")
|
||||
endif()
|
||||
|
||||
set(GIT_SSH 1)
|
||||
set(GIT_SSH_LIBSSH2 1)
|
||||
add_feature_info(SSH ON "using libssh2")
|
||||
|
||||
Reference in New Issue
Block a user