Skip to content

Commit 4802272

Browse files
committed
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.
1 parent a7c4c7d commit 4802272

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ if(MSVC)
7474
# This option must match the settings used in your program, in particular if you
7575
# are linking statically
7676
option(STATIC_CRT "Link the static CRT libraries" ON)
77-
78-
# If you want to embed a copy of libssh2 into libgit2, pass a
79-
# path to libssh2
80-
option(EMBED_SSH_PATH "Path to libssh2 to embed (Windows)" OFF)
8177
endif()
8278

8379
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)

cmake/SelectSSH.cmake

-9
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ elseif(USE_SSH STREQUAL ON OR USE_SSH STREQUAL "libssh2")
2727
set(GIT_SSH_LIBSSH2_MEMORY_CREDENTIALS 1)
2828
endif()
2929

30-
if(WIN32 AND EMBED_SSH_PATH)
31-
file(GLOB SSH_SRC "${EMBED_SSH_PATH}/src/*.c")
32-
list(SORT SSH_SRC)
33-
list(APPEND LIBGIT2_DEPENDENCY_OBJECTS ${SSH_SRC})
34-
35-
list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${EMBED_SSH_PATH}/include")
36-
file(WRITE "${EMBED_SSH_PATH}/src/libssh2_config.h" "#define HAVE_WINCNG\n#define LIBSSH2_WINCNG\n#include \"../win32/libssh2_config.h\"")
37-
endif()
38-
3930
set(GIT_SSH 1)
4031
set(GIT_SSH_LIBSSH2 1)
4132
add_feature_info(SSH ON "using libssh2")

0 commit comments

Comments
 (0)