Skip to content
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
27 changes: 27 additions & 0 deletions ports/libssh2/cmake-config.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/cmake/libssh2-config.cmake.in b/cmake/libssh2-config.cmake.in
index edc86d7..fd53d55 100644
--- a/cmake/libssh2-config.cmake.in
+++ b/cmake/libssh2-config.cmake.in
@@ -22,10 +22,22 @@ include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")

# Alias for either shared or static library
if(NOT TARGET @PROJECT_NAME@::@LIB_NAME@)
+ if(CMAKE_VERSION VERSION_LESS "3.18.0")
+ # cannot add alias to non-global imported library
+ add_library(@PROJECT_NAME@::@LIB_NAME@ INTERFACE IMPORTED)
+ set_target_properties(@PROJECT_NAME@::@LIB_NAME@ PROPERTIES INTERFACE_LINK_LIBRARIES @PROJECT_NAME@::@LIB_SELECTED@)
+ else()
add_library(@PROJECT_NAME@::@LIB_NAME@ ALIAS @PROJECT_NAME@::@LIB_SELECTED@)
+ endif()
endif()

# Compatibility alias
if(NOT TARGET Libssh2::@LIB_NAME@)
+ if(CMAKE_VERSION VERSION_LESS "3.18.0")
+ # cannot add alias to non-global imported library
+ add_library(Libssh2::@LIB_NAME@ INTERFACE IMPORTED)
+ set_target_properties(Libssh2::@LIB_NAME@ PROPERTIES INTERFACE_LINK_LIBRARIES @PROJECT_NAME@::@LIB_SELECTED@)
+ else()
add_library(Libssh2::@LIB_NAME@ ALIAS @PROJECT_NAME@::@LIB_SELECTED@)
+ endif()
endif()
3 changes: 2 additions & 1 deletion ports/libssh2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ vcpkg_from_github(
SHA512 616efcd7f5c1fb1046104ebce70549e4756e2a55150efa2df5bb7123051d3bf336023cedcbfe932cd7c690a0b4d1f1a93c760ea39f1dba50c2b06d0945dca958
HEAD_REF master
PATCHES
cmake-config.diff
pkgconfig.diff
)

Expand All @@ -24,11 +25,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
endif()

vcpkg_find_acquire_program(PKGCONFIG)
set(ENV{PKG_CONFIG} "${PKGCONFIG}")

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTING=OFF
-DENABLE_DEBUG_LOGGING=OFF
Expand Down
2 changes: 1 addition & 1 deletion ports/libssh2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libssh2",
"version": "1.11.1",
"port-version": 1,
"port-version": 2,
"description": "libssh2 is a client-side C library implementing the SSH2 protocol.",
"homepage": "https://www.libssh2.org",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5562,7 +5562,7 @@
},
"libssh2": {
"baseline": "1.11.1",
"port-version": 1
"port-version": 2
},
"libstemmer": {
"baseline": "2021.2.2.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libssh2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6c7dcac34e292ddbac4c17716d218f35606c65a6",
"version": "1.11.1",
"port-version": 2
},
{
"git-tree": "01783f68b91820c8270fe759f595b5562fb55a7c",
"version": "1.11.1",
Expand Down