Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LibSSH2] Fix import lib name on windows #5154

Merged
merged 3 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions L/LibSSH2/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ cd $WORKSPACE/srcdir/libssh2*/

# Apply patch to fix v1.10.0 CVE (https://github.com/libssh2/libssh2/issues/649), drop with v1.11
atomic_patch -p1 ../patches/0001-userauth-check-for-too-large-userauth_kybd_auth_name.patch
# Fix import lib name on windows: `liblibssh2.dll.a` ==> `libssh2.dll.a`
# Drop this when a new release contains: https://github.com/libssh2/libssh2/pull/711
atomic_patch -p1 ../patches/0002-libssh2-fix-import-lib-name.patch

BUILD_FLAGS=(
-DCMAKE_BUILD_TYPE=Release
Expand Down
25 changes: 25 additions & 0 deletions L/LibSSH2/bundled/patches/0002-libssh2-fix-import-lib-name.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 3732420725efbf410df5863b91a09ca214ee18ba Mon Sep 17 00:00:00 2001
From: "Y. Yang" <[email protected]>
Date: Thu, 16 Jun 2022 19:16:37 +0800
Subject: [PATCH] Fix DLL import library name

https://aur.archlinux.org/packages/mingw-w64-libssh2
https://cmake.org/cmake/help/latest/prop_tgt/IMPORT_PREFIX.html
---
src/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cb8fee1..17ecefd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -220,6 +220,7 @@ endif()
add_library(libssh2 ${SOURCES})
# we want it to be called libssh2 on all platforms
set_target_properties(libssh2 PROPERTIES PREFIX "")
+set_target_properties(libssh2 PROPERTIES IMPORT_PREFIX "")

target_compile_definitions(libssh2 PRIVATE ${PRIVATE_COMPILE_DEFINITIONS})
target_include_directories(libssh2
--
2.36.1