Skip to content

Commit e974fd4

Browse files
authored
[LibSSH2] Fix import lib name on windows (#5154)
* [LibSSH2] Fix import lib name on windows `liblibssh2.dll.a` ==> `libssh2.dll.a` xref: JuliaLang/julia#45914 * [LibSSH2] copy import lib to maintain backwards compatibility copy `libssh2.dll.a` => `liblibssh2.dll.a` * [libSSH2] Revert a4df288
1 parent 55625f5 commit e974fd4

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

L/LibSSH2/build_tarballs.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ cd $WORKSPACE/srcdir/libssh2*/
1818
1919
# Apply patch to fix v1.10.0 CVE (https://github.com/libssh2/libssh2/issues/649), drop with v1.11
2020
atomic_patch -p1 ../patches/0001-userauth-check-for-too-large-userauth_kybd_auth_name.patch
21+
# Fix import lib name on windows: `liblibssh2.dll.a` ==> `libssh2.dll.a`
22+
# Drop this when a new release contains: https://github.com/libssh2/libssh2/pull/711
23+
atomic_patch -p1 ../patches/0002-libssh2-fix-import-lib-name.patch
2124
2225
BUILD_FLAGS=(
2326
-DCMAKE_BUILD_TYPE=Release
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 3732420725efbf410df5863b91a09ca214ee18ba Mon Sep 17 00:00:00 2001
2+
From: "Y. Yang" <metab0t@users.noreply.github.com>
3+
Date: Thu, 16 Jun 2022 19:16:37 +0800
4+
Subject: [PATCH] Fix DLL import library name
5+
6+
https://aur.archlinux.org/packages/mingw-w64-libssh2
7+
https://cmake.org/cmake/help/latest/prop_tgt/IMPORT_PREFIX.html
8+
---
9+
src/CMakeLists.txt | 1 +
10+
1 file changed, 1 insertion(+)
11+
12+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
13+
index cb8fee1..17ecefd 100644
14+
--- a/src/CMakeLists.txt
15+
+++ b/src/CMakeLists.txt
16+
@@ -220,6 +220,7 @@ endif()
17+
add_library(libssh2 ${SOURCES})
18+
# we want it to be called libssh2 on all platforms
19+
set_target_properties(libssh2 PROPERTIES PREFIX "")
20+
+set_target_properties(libssh2 PROPERTIES IMPORT_PREFIX "")
21+
22+
target_compile_definitions(libssh2 PRIVATE ${PRIVATE_COMPILE_DEFINITIONS})
23+
target_include_directories(libssh2
24+
--
25+
2.36.1

0 commit comments

Comments
 (0)