@crossbind/port-curl-ios 2.0.0-beta.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +12 -0
- package/crossbind-port-curl.podspec +15 -0
- package/crossbind.build.js +1 -0
- package/crossbind.config.js +7 -0
- package/curl.xcframework/Info.plist +47 -0
- package/curl.xcframework/ios-arm64/Headers/curl/curl.h +3347 -0
- package/curl.xcframework/ios-arm64/Headers/curl/curlver.h +78 -0
- package/curl.xcframework/ios-arm64/Headers/curl/easy.h +123 -0
- package/curl.xcframework/ios-arm64/Headers/curl/header.h +74 -0
- package/curl.xcframework/ios-arm64/Headers/curl/mprintf.h +85 -0
- package/curl.xcframework/ios-arm64/Headers/curl/multi.h +560 -0
- package/curl.xcframework/ios-arm64/Headers/curl/options.h +70 -0
- package/curl.xcframework/ios-arm64/Headers/curl/stdcheaders.h +35 -0
- package/curl.xcframework/ios-arm64/Headers/curl/system.h +399 -0
- package/curl.xcframework/ios-arm64/Headers/curl/typecheck-gcc.h +960 -0
- package/curl.xcframework/ios-arm64/Headers/curl/urlapi.h +155 -0
- package/curl.xcframework/ios-arm64/Headers/curl/websockets.h +98 -0
- package/curl.xcframework/ios-arm64/libcurl.a +0 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/curl.h +3347 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/curlver.h +78 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/easy.h +123 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/header.h +74 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/mprintf.h +85 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/multi.h +560 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/options.h +70 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/stdcheaders.h +35 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/system.h +399 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/typecheck-gcc.h +960 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/urlapi.h +155 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/websockets.h +98 -0
- package/curl.xcframework/ios-arm64-simulator/libcurl.a +0 -0
- package/dist/prebuilt/CMakeLists.txt +57 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/crossbind-emccflags.fingerprint +1 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/curl.h +3347 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/curlver.h +78 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/easy.h +123 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/header.h +74 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/mprintf.h +85 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/multi.h +560 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/options.h +70 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/stdcheaders.h +35 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/system.h +399 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/typecheck-gcc.h +960 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/urlapi.h +155 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/websockets.h +98 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLConfig.cmake +220 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLConfigVersion.cmake +71 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLTargets-release.cmake +19 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLTargets.cmake +108 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindBrotli.cmake +96 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindCares.cmake +132 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindGSS.cmake +264 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindGnuTLS.cmake +92 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLDAP.cmake +115 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibbacktrace.cmake +61 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibgsasl.cmake +91 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibidn2.cmake +92 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibpsl.cmake +92 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibssh.cmake +118 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibssh2.cmake +117 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibuv.cmake +102 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindMbedTLS.cmake +137 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNGHTTP2.cmake +116 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNGHTTP3.cmake +116 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNGTCP2.cmake +187 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNettle.cmake +97 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindQuiche.cmake +80 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindRustls.cmake +116 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindWolfSSL.cmake +135 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindZstd.cmake +144 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/libcurl.a +0 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/pkgconfig/libcurl.pc +41 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/share/man/man1/curl-config.1 +90 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/crossbind-emccflags.fingerprint +1 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/curl.h +3347 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/curlver.h +78 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/easy.h +123 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/header.h +74 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/mprintf.h +85 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/multi.h +560 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/options.h +70 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/stdcheaders.h +35 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/system.h +399 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/typecheck-gcc.h +960 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/urlapi.h +155 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/websockets.h +98 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLConfig.cmake +220 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLConfigVersion.cmake +71 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLTargets-release.cmake +19 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLTargets.cmake +108 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindBrotli.cmake +96 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindCares.cmake +132 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindGSS.cmake +264 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindGnuTLS.cmake +92 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLDAP.cmake +115 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibbacktrace.cmake +61 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibgsasl.cmake +91 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibidn2.cmake +92 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibpsl.cmake +92 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibssh.cmake +118 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibssh2.cmake +117 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibuv.cmake +102 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindMbedTLS.cmake +137 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNGHTTP2.cmake +116 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNGHTTP3.cmake +116 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNGTCP2.cmake +187 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNettle.cmake +97 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindQuiche.cmake +80 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindRustls.cmake +116 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindWolfSSL.cmake +135 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindZstd.cmake +144 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/libcurl.a +0 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/pkgconfig/libcurl.pc +41 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/share/man/man1/curl-config.1 +90 -0
- package/package.json +34 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#***************************************************************************
|
|
2
|
+
# _ _ ____ _
|
|
3
|
+
# Project ___| | | | _ \| |
|
|
4
|
+
# / __| | | | |_) | |
|
|
5
|
+
# | (__| |_| | _ <| |___
|
|
6
|
+
# \___|\___/|_| \_\_____|
|
|
7
|
+
#
|
|
8
|
+
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
9
|
+
#
|
|
10
|
+
# This software is licensed as described in the file COPYING, which
|
|
11
|
+
# you should have received as part of this distribution. The terms
|
|
12
|
+
# are also available at https://curl.se/docs/copyright.html.
|
|
13
|
+
#
|
|
14
|
+
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
15
|
+
# copies of the Software, and permit persons to whom the Software is
|
|
16
|
+
# furnished to do so, under the terms of the COPYING file.
|
|
17
|
+
#
|
|
18
|
+
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
19
|
+
# KIND, either express or implied.
|
|
20
|
+
#
|
|
21
|
+
# SPDX-License-Identifier: curl
|
|
22
|
+
#
|
|
23
|
+
###########################################################################
|
|
24
|
+
# Find the ldap library
|
|
25
|
+
#
|
|
26
|
+
# Input variables:
|
|
27
|
+
#
|
|
28
|
+
# - `LDAP_INCLUDE_DIR`: Absolute path to ldap include directory.
|
|
29
|
+
# - `LDAP_LIBRARY`: Absolute path to `ldap` library.
|
|
30
|
+
# - `LDAP_LBER_LIBRARY`: Absolute path to `lber` library.
|
|
31
|
+
#
|
|
32
|
+
# Defines:
|
|
33
|
+
#
|
|
34
|
+
# - `LDAP_FOUND`: System has ldap.
|
|
35
|
+
# - `LDAP_VERSION`: Version of ldap.
|
|
36
|
+
# - `CURL::ldap`: ldap library target.
|
|
37
|
+
|
|
38
|
+
set(_ldap_pc_requires "ldap" "lber")
|
|
39
|
+
|
|
40
|
+
if(CURL_USE_PKGCONFIG AND
|
|
41
|
+
NOT DEFINED LDAP_INCLUDE_DIR AND
|
|
42
|
+
NOT DEFINED LDAP_LIBRARY AND
|
|
43
|
+
NOT DEFINED LDAP_LBER_LIBRARY)
|
|
44
|
+
find_package(PkgConfig QUIET)
|
|
45
|
+
pkg_check_modules(_ldap ${_ldap_pc_requires})
|
|
46
|
+
endif()
|
|
47
|
+
|
|
48
|
+
if(_ldap_FOUND)
|
|
49
|
+
set(LDAP_FOUND TRUE)
|
|
50
|
+
set(LDAP_VERSION ${_ldap_ldap_VERSION})
|
|
51
|
+
message(STATUS "Found LDAP (via pkg-config): ${_ldap_INCLUDE_DIRS} (found version \"${LDAP_VERSION}\")")
|
|
52
|
+
else()
|
|
53
|
+
set(_ldap_pc_requires "") # Depend on pkg-config only when found via pkg-config
|
|
54
|
+
|
|
55
|
+
# On Apple the SDK LDAP gets picked up from
|
|
56
|
+
# 'MacOSX.sdk/System/Library/Frameworks/LDAP.framework/Headers', which contains
|
|
57
|
+
# ldap.h and lber.h both being stubs to include <ldap.h> and <lber.h>.
|
|
58
|
+
# This causes an infinite inclusion loop in compile. Also do this for libraries
|
|
59
|
+
# to avoid picking up the 'ldap.framework' with a full path.
|
|
60
|
+
set(_save_cmake_system_framework_path ${CMAKE_SYSTEM_FRAMEWORK_PATH})
|
|
61
|
+
set(CMAKE_SYSTEM_FRAMEWORK_PATH "")
|
|
62
|
+
find_path(LDAP_INCLUDE_DIR NAMES "ldap.h")
|
|
63
|
+
find_library(LDAP_LIBRARY NAMES "ldap")
|
|
64
|
+
find_library(LDAP_LBER_LIBRARY NAMES "lber")
|
|
65
|
+
set(CMAKE_SYSTEM_FRAMEWORK_PATH ${_save_cmake_system_framework_path})
|
|
66
|
+
|
|
67
|
+
unset(LDAP_VERSION CACHE)
|
|
68
|
+
if(LDAP_INCLUDE_DIR AND EXISTS "${LDAP_INCLUDE_DIR}/ldap_features.h")
|
|
69
|
+
set(_version_regex1 "#[\t ]*define[\t ]+LDAP_VENDOR_VERSION_MAJOR[\t ]+([0-9]+).*")
|
|
70
|
+
set(_version_regex2 "#[\t ]*define[\t ]+LDAP_VENDOR_VERSION_MINOR[\t ]+([0-9]+).*")
|
|
71
|
+
set(_version_regex3 "#[\t ]*define[\t ]+LDAP_VENDOR_VERSION_PATCH[\t ]+([0-9]+).*")
|
|
72
|
+
file(STRINGS "${LDAP_INCLUDE_DIR}/ldap_features.h" _version_str1 REGEX "${_version_regex1}")
|
|
73
|
+
file(STRINGS "${LDAP_INCLUDE_DIR}/ldap_features.h" _version_str2 REGEX "${_version_regex2}")
|
|
74
|
+
file(STRINGS "${LDAP_INCLUDE_DIR}/ldap_features.h" _version_str3 REGEX "${_version_regex3}")
|
|
75
|
+
string(REGEX REPLACE "${_version_regex1}" "\\1" _version_str1 "${_version_str1}")
|
|
76
|
+
string(REGEX REPLACE "${_version_regex2}" "\\1" _version_str2 "${_version_str2}")
|
|
77
|
+
string(REGEX REPLACE "${_version_regex3}" "\\1" _version_str3 "${_version_str3}")
|
|
78
|
+
set(LDAP_VERSION "${_version_str1}.${_version_str2}.${_version_str3}")
|
|
79
|
+
unset(_version_regex1)
|
|
80
|
+
unset(_version_regex2)
|
|
81
|
+
unset(_version_regex3)
|
|
82
|
+
unset(_version_str1)
|
|
83
|
+
unset(_version_str2)
|
|
84
|
+
unset(_version_str3)
|
|
85
|
+
endif()
|
|
86
|
+
|
|
87
|
+
include(FindPackageHandleStandardArgs)
|
|
88
|
+
find_package_handle_standard_args(LDAP
|
|
89
|
+
REQUIRED_VARS
|
|
90
|
+
LDAP_INCLUDE_DIR
|
|
91
|
+
LDAP_LIBRARY
|
|
92
|
+
LDAP_LBER_LIBRARY
|
|
93
|
+
VERSION_VAR
|
|
94
|
+
LDAP_VERSION
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
if(LDAP_FOUND)
|
|
98
|
+
set(_ldap_INCLUDE_DIRS ${LDAP_INCLUDE_DIR})
|
|
99
|
+
set(_ldap_LIBRARIES ${LDAP_LIBRARY} ${LDAP_LBER_LIBRARY})
|
|
100
|
+
endif()
|
|
101
|
+
|
|
102
|
+
mark_as_advanced(LDAP_INCLUDE_DIR LDAP_LIBRARY LDAP_LBER_LIBRARY)
|
|
103
|
+
endif()
|
|
104
|
+
|
|
105
|
+
if(LDAP_FOUND)
|
|
106
|
+
if(NOT TARGET CURL::ldap)
|
|
107
|
+
add_library(CURL::ldap INTERFACE IMPORTED)
|
|
108
|
+
set_target_properties(CURL::ldap PROPERTIES
|
|
109
|
+
INTERFACE_LIBCURL_PC_MODULES "${_ldap_pc_requires}"
|
|
110
|
+
INTERFACE_COMPILE_OPTIONS "${_ldap_CFLAGS}"
|
|
111
|
+
INTERFACE_INCLUDE_DIRECTORIES "${_ldap_INCLUDE_DIRS}"
|
|
112
|
+
INTERFACE_LINK_DIRECTORIES "${_ldap_LIBRARY_DIRS}"
|
|
113
|
+
INTERFACE_LINK_LIBRARIES "${_ldap_LIBRARIES}")
|
|
114
|
+
endif()
|
|
115
|
+
endif()
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#***************************************************************************
|
|
2
|
+
# _ _ ____ _
|
|
3
|
+
# Project ___| | | | _ \| |
|
|
4
|
+
# / __| | | | |_) | |
|
|
5
|
+
# | (__| |_| | _ <| |___
|
|
6
|
+
# \___|\___/|_| \_\_____|
|
|
7
|
+
#
|
|
8
|
+
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
9
|
+
#
|
|
10
|
+
# This software is licensed as described in the file COPYING, which
|
|
11
|
+
# you should have received as part of this distribution. The terms
|
|
12
|
+
# are also available at https://curl.se/docs/copyright.html.
|
|
13
|
+
#
|
|
14
|
+
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
15
|
+
# copies of the Software, and permit persons to whom the Software is
|
|
16
|
+
# furnished to do so, under the terms of the COPYING file.
|
|
17
|
+
#
|
|
18
|
+
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
19
|
+
# KIND, either express or implied.
|
|
20
|
+
#
|
|
21
|
+
# SPDX-License-Identifier: curl
|
|
22
|
+
#
|
|
23
|
+
###########################################################################
|
|
24
|
+
# Find the libbacktrace library
|
|
25
|
+
#
|
|
26
|
+
# Input variables:
|
|
27
|
+
#
|
|
28
|
+
# - `LIBBACKTRACE_INCLUDE_DIR`: Absolute path to libbacktrace include directory.
|
|
29
|
+
# - `LIBBACKTRACE_LIBRARY`: Absolute path to `libbacktrace` library.
|
|
30
|
+
#
|
|
31
|
+
# Defines:
|
|
32
|
+
#
|
|
33
|
+
# - `LIBBACKTRACE_FOUND`: System has libbacktrace.
|
|
34
|
+
# - `CURL::libbacktrace`: libbacktrace library target.
|
|
35
|
+
|
|
36
|
+
find_path(LIBBACKTRACE_INCLUDE_DIR NAMES "backtrace.h")
|
|
37
|
+
find_library(LIBBACKTRACE_LIBRARY NAMES "backtrace" "libbacktrace")
|
|
38
|
+
|
|
39
|
+
include(FindPackageHandleStandardArgs)
|
|
40
|
+
find_package_handle_standard_args(Libbacktrace
|
|
41
|
+
REQUIRED_VARS
|
|
42
|
+
LIBBACKTRACE_INCLUDE_DIR
|
|
43
|
+
LIBBACKTRACE_LIBRARY
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
if(LIBBACKTRACE_FOUND)
|
|
47
|
+
set(_libbacktrace_INCLUDE_DIRS ${LIBBACKTRACE_INCLUDE_DIR})
|
|
48
|
+
set(_libbacktrace_LIBRARIES ${LIBBACKTRACE_LIBRARY})
|
|
49
|
+
|
|
50
|
+
if(NOT TARGET CURL::libbacktrace)
|
|
51
|
+
add_library(CURL::libbacktrace INTERFACE IMPORTED)
|
|
52
|
+
set_target_properties(CURL::libbacktrace PROPERTIES
|
|
53
|
+
INTERFACE_LIBCURL_PC_MODULES "${_libbacktrace_pc_requires}"
|
|
54
|
+
INTERFACE_COMPILE_OPTIONS "${_libbacktrace_CFLAGS}"
|
|
55
|
+
INTERFACE_INCLUDE_DIRECTORIES "${_libbacktrace_INCLUDE_DIRS}"
|
|
56
|
+
INTERFACE_LINK_DIRECTORIES "${_libbacktrace_LIBRARY_DIRS}"
|
|
57
|
+
INTERFACE_LINK_LIBRARIES "${_libbacktrace_LIBRARIES}")
|
|
58
|
+
endif()
|
|
59
|
+
endif()
|
|
60
|
+
|
|
61
|
+
mark_as_advanced(LIBBACKTRACE_INCLUDE_DIR LIBBACKTRACE_LIBRARY)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#***************************************************************************
|
|
2
|
+
# _ _ ____ _
|
|
3
|
+
# Project ___| | | | _ \| |
|
|
4
|
+
# / __| | | | |_) | |
|
|
5
|
+
# | (__| |_| | _ <| |___
|
|
6
|
+
# \___|\___/|_| \_\_____|
|
|
7
|
+
#
|
|
8
|
+
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
9
|
+
#
|
|
10
|
+
# This software is licensed as described in the file COPYING, which
|
|
11
|
+
# you should have received as part of this distribution. The terms
|
|
12
|
+
# are also available at https://curl.se/docs/copyright.html.
|
|
13
|
+
#
|
|
14
|
+
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
15
|
+
# copies of the Software, and permit persons to whom the Software is
|
|
16
|
+
# furnished to do so, under the terms of the COPYING file.
|
|
17
|
+
#
|
|
18
|
+
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
19
|
+
# KIND, either express or implied.
|
|
20
|
+
#
|
|
21
|
+
# SPDX-License-Identifier: curl
|
|
22
|
+
#
|
|
23
|
+
###########################################################################
|
|
24
|
+
# Find the libgsasl library
|
|
25
|
+
#
|
|
26
|
+
# Input variables:
|
|
27
|
+
#
|
|
28
|
+
# - `LIBGSASL_INCLUDE_DIR`: Absolute path to libgsasl include directory.
|
|
29
|
+
# - `LIBGSASL_LIBRARY`: Absolute path to `libgsasl` library.
|
|
30
|
+
#
|
|
31
|
+
# Defines:
|
|
32
|
+
#
|
|
33
|
+
# - `LIBGSASL_FOUND`: System has libgsasl.
|
|
34
|
+
# - `LIBGSASL_VERSION`: Version of libgsasl.
|
|
35
|
+
# - `CURL::libgsasl`: libgsasl library target.
|
|
36
|
+
|
|
37
|
+
set(_libgsasl_pc_requires "libgsasl")
|
|
38
|
+
|
|
39
|
+
if(CURL_USE_PKGCONFIG AND
|
|
40
|
+
NOT DEFINED LIBGSASL_INCLUDE_DIR AND
|
|
41
|
+
NOT DEFINED LIBGSASL_LIBRARY)
|
|
42
|
+
find_package(PkgConfig QUIET)
|
|
43
|
+
pkg_check_modules(_libgsasl ${_libgsasl_pc_requires})
|
|
44
|
+
endif()
|
|
45
|
+
|
|
46
|
+
if(_libgsasl_FOUND)
|
|
47
|
+
set(Libgsasl_FOUND TRUE)
|
|
48
|
+
set(LIBGSASL_FOUND TRUE)
|
|
49
|
+
message(STATUS "Found Libgsasl (via pkg-config): ${_libgsasl_INCLUDE_DIRS} (found version \"${LIBGSASL_VERSION}\")")
|
|
50
|
+
else()
|
|
51
|
+
find_path(LIBGSASL_INCLUDE_DIR NAMES "gsasl.h")
|
|
52
|
+
find_library(LIBGSASL_LIBRARY NAMES "gsasl" "libgsasl")
|
|
53
|
+
|
|
54
|
+
unset(LIBGSASL_VERSION CACHE)
|
|
55
|
+
if(LIBGSASL_INCLUDE_DIR AND EXISTS "${LIBGSASL_INCLUDE_DIR}/gsasl-version.h")
|
|
56
|
+
set(_version_regex "#[\t ]*define[\t ]+GSASL_VERSION[\t ]+\"([^\"]*)\"")
|
|
57
|
+
file(STRINGS "${LIBGSASL_INCLUDE_DIR}/gsasl-version.h" _version_str REGEX "${_version_regex}")
|
|
58
|
+
string(REGEX REPLACE "${_version_regex}" "\\1" _version_str "${_version_str}")
|
|
59
|
+
set(LIBGSASL_VERSION "${_version_str}")
|
|
60
|
+
unset(_version_regex)
|
|
61
|
+
unset(_version_str)
|
|
62
|
+
endif()
|
|
63
|
+
|
|
64
|
+
include(FindPackageHandleStandardArgs)
|
|
65
|
+
find_package_handle_standard_args(Libgsasl
|
|
66
|
+
REQUIRED_VARS
|
|
67
|
+
LIBGSASL_INCLUDE_DIR
|
|
68
|
+
LIBGSASL_LIBRARY
|
|
69
|
+
VERSION_VAR
|
|
70
|
+
LIBGSASL_VERSION
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
if(LIBGSASL_FOUND)
|
|
74
|
+
set(_libgsasl_INCLUDE_DIRS ${LIBGSASL_INCLUDE_DIR})
|
|
75
|
+
set(_libgsasl_LIBRARIES ${LIBGSASL_LIBRARY})
|
|
76
|
+
endif()
|
|
77
|
+
|
|
78
|
+
mark_as_advanced(LIBGSASL_INCLUDE_DIR LIBGSASL_LIBRARY)
|
|
79
|
+
endif()
|
|
80
|
+
|
|
81
|
+
if(LIBGSASL_FOUND)
|
|
82
|
+
if(NOT TARGET CURL::libgsasl)
|
|
83
|
+
add_library(CURL::libgsasl INTERFACE IMPORTED)
|
|
84
|
+
set_target_properties(CURL::libgsasl PROPERTIES
|
|
85
|
+
INTERFACE_LIBCURL_PC_MODULES "${_libgsasl_pc_requires}"
|
|
86
|
+
INTERFACE_COMPILE_OPTIONS "${_libgsasl_CFLAGS}"
|
|
87
|
+
INTERFACE_INCLUDE_DIRECTORIES "${_libgsasl_INCLUDE_DIRS}"
|
|
88
|
+
INTERFACE_LINK_DIRECTORIES "${_libgsasl_LIBRARY_DIRS}"
|
|
89
|
+
INTERFACE_LINK_LIBRARIES "${_libgsasl_LIBRARIES}")
|
|
90
|
+
endif()
|
|
91
|
+
endif()
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#***************************************************************************
|
|
2
|
+
# _ _ ____ _
|
|
3
|
+
# Project ___| | | | _ \| |
|
|
4
|
+
# / __| | | | |_) | |
|
|
5
|
+
# | (__| |_| | _ <| |___
|
|
6
|
+
# \___|\___/|_| \_\_____|
|
|
7
|
+
#
|
|
8
|
+
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
9
|
+
#
|
|
10
|
+
# This software is licensed as described in the file COPYING, which
|
|
11
|
+
# you should have received as part of this distribution. The terms
|
|
12
|
+
# are also available at https://curl.se/docs/copyright.html.
|
|
13
|
+
#
|
|
14
|
+
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
15
|
+
# copies of the Software, and permit persons to whom the Software is
|
|
16
|
+
# furnished to do so, under the terms of the COPYING file.
|
|
17
|
+
#
|
|
18
|
+
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
19
|
+
# KIND, either express or implied.
|
|
20
|
+
#
|
|
21
|
+
# SPDX-License-Identifier: curl
|
|
22
|
+
#
|
|
23
|
+
###########################################################################
|
|
24
|
+
# Find the libidn2 library
|
|
25
|
+
#
|
|
26
|
+
# Input variables:
|
|
27
|
+
#
|
|
28
|
+
# - `LIBIDN2_INCLUDE_DIR`: Absolute path to libidn2 include directory.
|
|
29
|
+
# - `LIBIDN2_LIBRARY`: Absolute path to `libidn2` library.
|
|
30
|
+
#
|
|
31
|
+
# Defines:
|
|
32
|
+
#
|
|
33
|
+
# - `LIBIDN2_FOUND`: System has libidn2.
|
|
34
|
+
# - `LIBIDN2_VERSION`: Version of libidn2.
|
|
35
|
+
# - `CURL::libidn2`: libidn2 library target.
|
|
36
|
+
|
|
37
|
+
set(_libidn2_pc_requires "libidn2")
|
|
38
|
+
|
|
39
|
+
if(CURL_USE_PKGCONFIG AND
|
|
40
|
+
NOT DEFINED LIBIDN2_INCLUDE_DIR AND
|
|
41
|
+
NOT DEFINED LIBIDN2_LIBRARY)
|
|
42
|
+
find_package(PkgConfig QUIET)
|
|
43
|
+
pkg_check_modules(_libidn2 ${_libidn2_pc_requires})
|
|
44
|
+
endif()
|
|
45
|
+
|
|
46
|
+
if(_libidn2_FOUND)
|
|
47
|
+
set(Libidn2_FOUND TRUE)
|
|
48
|
+
set(LIBIDN2_FOUND TRUE)
|
|
49
|
+
set(LIBIDN2_VERSION ${_libidn2_VERSION})
|
|
50
|
+
message(STATUS "Found Libidn2 (via pkg-config): ${_libidn2_INCLUDE_DIRS} (found version \"${LIBIDN2_VERSION}\")")
|
|
51
|
+
else()
|
|
52
|
+
find_path(LIBIDN2_INCLUDE_DIR NAMES "idn2.h")
|
|
53
|
+
find_library(LIBIDN2_LIBRARY NAMES "idn2" "libidn2")
|
|
54
|
+
|
|
55
|
+
unset(LIBIDN2_VERSION CACHE)
|
|
56
|
+
if(LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/idn2.h")
|
|
57
|
+
set(_version_regex "#[\t ]*define[\t ]+IDN2_VERSION[\t ]+\"([^\"]*)\"")
|
|
58
|
+
file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" _version_str REGEX "${_version_regex}")
|
|
59
|
+
string(REGEX REPLACE "${_version_regex}" "\\1" _version_str "${_version_str}")
|
|
60
|
+
set(LIBIDN2_VERSION "${_version_str}")
|
|
61
|
+
unset(_version_regex)
|
|
62
|
+
unset(_version_str)
|
|
63
|
+
endif()
|
|
64
|
+
|
|
65
|
+
include(FindPackageHandleStandardArgs)
|
|
66
|
+
find_package_handle_standard_args(Libidn2
|
|
67
|
+
REQUIRED_VARS
|
|
68
|
+
LIBIDN2_INCLUDE_DIR
|
|
69
|
+
LIBIDN2_LIBRARY
|
|
70
|
+
VERSION_VAR
|
|
71
|
+
LIBIDN2_VERSION
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
if(LIBIDN2_FOUND)
|
|
75
|
+
set(_libidn2_INCLUDE_DIRS ${LIBIDN2_INCLUDE_DIR})
|
|
76
|
+
set(_libidn2_LIBRARIES ${LIBIDN2_LIBRARY})
|
|
77
|
+
endif()
|
|
78
|
+
|
|
79
|
+
mark_as_advanced(LIBIDN2_INCLUDE_DIR LIBIDN2_LIBRARY)
|
|
80
|
+
endif()
|
|
81
|
+
|
|
82
|
+
if(LIBIDN2_FOUND)
|
|
83
|
+
if(NOT TARGET CURL::libidn2)
|
|
84
|
+
add_library(CURL::libidn2 INTERFACE IMPORTED)
|
|
85
|
+
set_target_properties(CURL::libidn2 PROPERTIES
|
|
86
|
+
INTERFACE_LIBCURL_PC_MODULES "${_libidn2_pc_requires}"
|
|
87
|
+
INTERFACE_COMPILE_OPTIONS "${_libidn2_CFLAGS}"
|
|
88
|
+
INTERFACE_INCLUDE_DIRECTORIES "${_libidn2_INCLUDE_DIRS}"
|
|
89
|
+
INTERFACE_LINK_DIRECTORIES "${_libidn2_LIBRARY_DIRS}"
|
|
90
|
+
INTERFACE_LINK_LIBRARIES "${_libidn2_LIBRARIES}")
|
|
91
|
+
endif()
|
|
92
|
+
endif()
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#***************************************************************************
|
|
2
|
+
# _ _ ____ _
|
|
3
|
+
# Project ___| | | | _ \| |
|
|
4
|
+
# / __| | | | |_) | |
|
|
5
|
+
# | (__| |_| | _ <| |___
|
|
6
|
+
# \___|\___/|_| \_\_____|
|
|
7
|
+
#
|
|
8
|
+
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
9
|
+
#
|
|
10
|
+
# This software is licensed as described in the file COPYING, which
|
|
11
|
+
# you should have received as part of this distribution. The terms
|
|
12
|
+
# are also available at https://curl.se/docs/copyright.html.
|
|
13
|
+
#
|
|
14
|
+
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
15
|
+
# copies of the Software, and permit persons to whom the Software is
|
|
16
|
+
# furnished to do so, under the terms of the COPYING file.
|
|
17
|
+
#
|
|
18
|
+
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
19
|
+
# KIND, either express or implied.
|
|
20
|
+
#
|
|
21
|
+
# SPDX-License-Identifier: curl
|
|
22
|
+
#
|
|
23
|
+
###########################################################################
|
|
24
|
+
# Find the libpsl library
|
|
25
|
+
#
|
|
26
|
+
# Input variables:
|
|
27
|
+
#
|
|
28
|
+
# - `LIBPSL_INCLUDE_DIR`: Absolute path to libpsl include directory.
|
|
29
|
+
# - `LIBPSL_LIBRARY`: Absolute path to `libpsl` library.
|
|
30
|
+
#
|
|
31
|
+
# Defines:
|
|
32
|
+
#
|
|
33
|
+
# - `LIBPSL_FOUND`: System has libpsl.
|
|
34
|
+
# - `LIBPSL_VERSION`: Version of libpsl.
|
|
35
|
+
# - `CURL::libpsl`: libpsl library target.
|
|
36
|
+
|
|
37
|
+
set(_libpsl_pc_requires "libpsl")
|
|
38
|
+
|
|
39
|
+
if(CURL_USE_PKGCONFIG AND
|
|
40
|
+
NOT DEFINED LIBPSL_INCLUDE_DIR AND
|
|
41
|
+
NOT DEFINED LIBPSL_LIBRARY)
|
|
42
|
+
find_package(PkgConfig QUIET)
|
|
43
|
+
pkg_check_modules(_libpsl ${_libpsl_pc_requires})
|
|
44
|
+
endif()
|
|
45
|
+
|
|
46
|
+
if(_libpsl_FOUND AND _libpsl_INCLUDE_DIRS)
|
|
47
|
+
set(Libpsl_FOUND TRUE)
|
|
48
|
+
set(LIBPSL_FOUND TRUE)
|
|
49
|
+
set(LIBPSL_VERSION ${_libpsl_VERSION})
|
|
50
|
+
message(STATUS "Found Libpsl (via pkg-config): ${_libpsl_INCLUDE_DIRS} (found version \"${LIBPSL_VERSION}\")")
|
|
51
|
+
else()
|
|
52
|
+
find_path(LIBPSL_INCLUDE_DIR NAMES "libpsl.h")
|
|
53
|
+
find_library(LIBPSL_LIBRARY NAMES "psl" "libpsl")
|
|
54
|
+
|
|
55
|
+
unset(LIBPSL_VERSION CACHE)
|
|
56
|
+
if(LIBPSL_INCLUDE_DIR AND EXISTS "${LIBPSL_INCLUDE_DIR}/libpsl.h")
|
|
57
|
+
set(_version_regex "#[\t ]*define[\t ]+PSL_VERSION[\t ]+\"([^\"]*)\"")
|
|
58
|
+
file(STRINGS "${LIBPSL_INCLUDE_DIR}/libpsl.h" _version_str REGEX "${_version_regex}")
|
|
59
|
+
string(REGEX REPLACE "${_version_regex}" "\\1" _version_str "${_version_str}")
|
|
60
|
+
set(LIBPSL_VERSION "${_version_str}")
|
|
61
|
+
unset(_version_regex)
|
|
62
|
+
unset(_version_str)
|
|
63
|
+
endif()
|
|
64
|
+
|
|
65
|
+
include(FindPackageHandleStandardArgs)
|
|
66
|
+
find_package_handle_standard_args(Libpsl
|
|
67
|
+
REQUIRED_VARS
|
|
68
|
+
LIBPSL_INCLUDE_DIR
|
|
69
|
+
LIBPSL_LIBRARY
|
|
70
|
+
VERSION_VAR
|
|
71
|
+
LIBPSL_VERSION
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
if(LIBPSL_FOUND)
|
|
75
|
+
set(_libpsl_INCLUDE_DIRS ${LIBPSL_INCLUDE_DIR})
|
|
76
|
+
set(_libpsl_LIBRARIES ${LIBPSL_LIBRARY})
|
|
77
|
+
endif()
|
|
78
|
+
|
|
79
|
+
mark_as_advanced(LIBPSL_INCLUDE_DIR LIBPSL_LIBRARY)
|
|
80
|
+
endif()
|
|
81
|
+
|
|
82
|
+
if(LIBPSL_FOUND)
|
|
83
|
+
if(NOT TARGET CURL::libpsl)
|
|
84
|
+
add_library(CURL::libpsl INTERFACE IMPORTED)
|
|
85
|
+
set_target_properties(CURL::libpsl PROPERTIES
|
|
86
|
+
INTERFACE_LIBCURL_PC_MODULES "${_libpsl_pc_requires}"
|
|
87
|
+
INTERFACE_COMPILE_OPTIONS "${_libpsl_CFLAGS}"
|
|
88
|
+
INTERFACE_INCLUDE_DIRECTORIES "${_libpsl_INCLUDE_DIRS}"
|
|
89
|
+
INTERFACE_LINK_DIRECTORIES "${_libpsl_LIBRARY_DIRS}"
|
|
90
|
+
INTERFACE_LINK_LIBRARIES "${_libpsl_LIBRARIES}")
|
|
91
|
+
endif()
|
|
92
|
+
endif()
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#***************************************************************************
|
|
2
|
+
# _ _ ____ _
|
|
3
|
+
# Project ___| | | | _ \| |
|
|
4
|
+
# / __| | | | |_) | |
|
|
5
|
+
# | (__| |_| | _ <| |___
|
|
6
|
+
# \___|\___/|_| \_\_____|
|
|
7
|
+
#
|
|
8
|
+
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
9
|
+
#
|
|
10
|
+
# This software is licensed as described in the file COPYING, which
|
|
11
|
+
# you should have received as part of this distribution. The terms
|
|
12
|
+
# are also available at https://curl.se/docs/copyright.html.
|
|
13
|
+
#
|
|
14
|
+
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
15
|
+
# copies of the Software, and permit persons to whom the Software is
|
|
16
|
+
# furnished to do so, under the terms of the COPYING file.
|
|
17
|
+
#
|
|
18
|
+
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
19
|
+
# KIND, either express or implied.
|
|
20
|
+
#
|
|
21
|
+
# SPDX-License-Identifier: curl
|
|
22
|
+
#
|
|
23
|
+
###########################################################################
|
|
24
|
+
# Find the libssh library
|
|
25
|
+
#
|
|
26
|
+
# Input variables:
|
|
27
|
+
#
|
|
28
|
+
# - `LIBSSH_INCLUDE_DIR`: Absolute path to libssh include directory.
|
|
29
|
+
# - `LIBSSH_LIBRARY`: Absolute path to `libssh` library.
|
|
30
|
+
# - `LIBSSH_USE_STATIC_LIBS`: Configure for static libssh libraries.
|
|
31
|
+
#
|
|
32
|
+
# Defines:
|
|
33
|
+
#
|
|
34
|
+
# - `LIBSSH_FOUND`: System has libssh.
|
|
35
|
+
# - `LIBSSH_VERSION`: Version of libssh.
|
|
36
|
+
# - `CURL::libssh`: libssh library target.
|
|
37
|
+
|
|
38
|
+
set(_libssh_pc_requires "libssh")
|
|
39
|
+
|
|
40
|
+
if(CURL_USE_PKGCONFIG AND
|
|
41
|
+
NOT DEFINED LIBSSH_INCLUDE_DIR AND
|
|
42
|
+
NOT DEFINED LIBSSH_LIBRARY)
|
|
43
|
+
find_package(PkgConfig QUIET)
|
|
44
|
+
pkg_check_modules(_libssh ${_libssh_pc_requires})
|
|
45
|
+
endif()
|
|
46
|
+
|
|
47
|
+
if(_libssh_FOUND)
|
|
48
|
+
set(Libssh_FOUND TRUE)
|
|
49
|
+
set(LIBSSH_FOUND TRUE)
|
|
50
|
+
set(LIBSSH_VERSION ${_libssh_VERSION})
|
|
51
|
+
if(LIBSSH_USE_STATIC_LIBS)
|
|
52
|
+
set(_libssh_CFLAGS "${_libssh_STATIC_CFLAGS}")
|
|
53
|
+
set(_libssh_INCLUDE_DIRS "${_libssh_STATIC_INCLUDE_DIRS}")
|
|
54
|
+
set(_libssh_LIBRARY_DIRS "${_libssh_STATIC_LIBRARY_DIRS}")
|
|
55
|
+
set(_libssh_LIBRARIES "${_libssh_STATIC_LIBRARIES}")
|
|
56
|
+
endif()
|
|
57
|
+
message(STATUS "Found Libssh (via pkg-config): ${_libssh_INCLUDE_DIRS} (found version \"${LIBSSH_VERSION}\")")
|
|
58
|
+
else()
|
|
59
|
+
find_path(LIBSSH_INCLUDE_DIR NAMES "libssh/libssh.h")
|
|
60
|
+
if(LIBSSH_USE_STATIC_LIBS)
|
|
61
|
+
set(_libssh_CFLAGS "-DLIBSSH_STATIC")
|
|
62
|
+
find_library(LIBSSH_LIBRARY NAMES "ssh_static" "libssh_static" "ssh" "libssh")
|
|
63
|
+
else()
|
|
64
|
+
find_library(LIBSSH_LIBRARY NAMES "ssh" "libssh")
|
|
65
|
+
endif()
|
|
66
|
+
|
|
67
|
+
unset(LIBSSH_VERSION CACHE)
|
|
68
|
+
if(LIBSSH_INCLUDE_DIR AND EXISTS "${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h")
|
|
69
|
+
set(_version_regex1 "#[\t ]*define[\t ]+LIBSSH_VERSION_MAJOR[\t ]+([0-9]+).*")
|
|
70
|
+
set(_version_regex2 "#[\t ]*define[\t ]+LIBSSH_VERSION_MINOR[\t ]+([0-9]+).*")
|
|
71
|
+
set(_version_regex3 "#[\t ]*define[\t ]+LIBSSH_VERSION_MICRO[\t ]+([0-9]+).*")
|
|
72
|
+
file(STRINGS "${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h" _version_str1 REGEX "${_version_regex1}")
|
|
73
|
+
file(STRINGS "${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h" _version_str2 REGEX "${_version_regex2}")
|
|
74
|
+
file(STRINGS "${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h" _version_str3 REGEX "${_version_regex3}")
|
|
75
|
+
string(REGEX REPLACE "${_version_regex1}" "\\1" _version_str1 "${_version_str1}")
|
|
76
|
+
string(REGEX REPLACE "${_version_regex2}" "\\1" _version_str2 "${_version_str2}")
|
|
77
|
+
string(REGEX REPLACE "${_version_regex3}" "\\1" _version_str3 "${_version_str3}")
|
|
78
|
+
set(LIBSSH_VERSION "${_version_str1}.${_version_str2}.${_version_str3}")
|
|
79
|
+
unset(_version_regex1)
|
|
80
|
+
unset(_version_regex2)
|
|
81
|
+
unset(_version_regex3)
|
|
82
|
+
unset(_version_str1)
|
|
83
|
+
unset(_version_str2)
|
|
84
|
+
unset(_version_str3)
|
|
85
|
+
endif()
|
|
86
|
+
|
|
87
|
+
include(FindPackageHandleStandardArgs)
|
|
88
|
+
find_package_handle_standard_args(Libssh
|
|
89
|
+
REQUIRED_VARS
|
|
90
|
+
LIBSSH_INCLUDE_DIR
|
|
91
|
+
LIBSSH_LIBRARY
|
|
92
|
+
VERSION_VAR
|
|
93
|
+
LIBSSH_VERSION
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
if(LIBSSH_FOUND)
|
|
97
|
+
set(_libssh_INCLUDE_DIRS ${LIBSSH_INCLUDE_DIR})
|
|
98
|
+
set(_libssh_LIBRARIES ${LIBSSH_LIBRARY})
|
|
99
|
+
endif()
|
|
100
|
+
|
|
101
|
+
mark_as_advanced(LIBSSH_INCLUDE_DIR LIBSSH_LIBRARY)
|
|
102
|
+
endif()
|
|
103
|
+
|
|
104
|
+
if(LIBSSH_FOUND)
|
|
105
|
+
if(WIN32)
|
|
106
|
+
list(APPEND _libssh_LIBRARIES "iphlpapi") # for if_nametoindex
|
|
107
|
+
endif()
|
|
108
|
+
|
|
109
|
+
if(NOT TARGET CURL::libssh)
|
|
110
|
+
add_library(CURL::libssh INTERFACE IMPORTED)
|
|
111
|
+
set_target_properties(CURL::libssh PROPERTIES
|
|
112
|
+
INTERFACE_LIBCURL_PC_MODULES "${_libssh_pc_requires}"
|
|
113
|
+
INTERFACE_COMPILE_OPTIONS "${_libssh_CFLAGS}"
|
|
114
|
+
INTERFACE_INCLUDE_DIRECTORIES "${_libssh_INCLUDE_DIRS}"
|
|
115
|
+
INTERFACE_LINK_DIRECTORIES "${_libssh_LIBRARY_DIRS}"
|
|
116
|
+
INTERFACE_LINK_LIBRARIES "${_libssh_LIBRARIES}")
|
|
117
|
+
endif()
|
|
118
|
+
endif()
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
#***************************************************************************
|
|
2
|
+
# _ _ ____ _
|
|
3
|
+
# Project ___| | | | _ \| |
|
|
4
|
+
# / __| | | | |_) | |
|
|
5
|
+
# | (__| |_| | _ <| |___
|
|
6
|
+
# \___|\___/|_| \_\_____|
|
|
7
|
+
#
|
|
8
|
+
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
9
|
+
#
|
|
10
|
+
# This software is licensed as described in the file COPYING, which
|
|
11
|
+
# you should have received as part of this distribution. The terms
|
|
12
|
+
# are also available at https://curl.se/docs/copyright.html.
|
|
13
|
+
#
|
|
14
|
+
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
15
|
+
# copies of the Software, and permit persons to whom the Software is
|
|
16
|
+
# furnished to do so, under the terms of the COPYING file.
|
|
17
|
+
#
|
|
18
|
+
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
19
|
+
# KIND, either express or implied.
|
|
20
|
+
#
|
|
21
|
+
# SPDX-License-Identifier: curl
|
|
22
|
+
#
|
|
23
|
+
###########################################################################
|
|
24
|
+
# Find the libssh2 library
|
|
25
|
+
#
|
|
26
|
+
# Input variables:
|
|
27
|
+
#
|
|
28
|
+
# - `LIBSSH2_INCLUDE_DIR`: Absolute path to libssh2 include directory.
|
|
29
|
+
# - `LIBSSH2_LIBRARY`: Absolute path to `libssh2` library.
|
|
30
|
+
# - `LIBSSH2_USE_STATIC_LIBS`: Configure for static libssh2 libraries.
|
|
31
|
+
#
|
|
32
|
+
# Defines:
|
|
33
|
+
#
|
|
34
|
+
# - `LIBSSH2_FOUND`: System has libssh2.
|
|
35
|
+
# - `LIBSSH2_VERSION`: Version of libssh2.
|
|
36
|
+
# - `CURL::libssh2`: libssh2 library target.
|
|
37
|
+
|
|
38
|
+
set(_libssh2_pc_requires "libssh2")
|
|
39
|
+
|
|
40
|
+
if(NOT DEFINED LIBSSH2_INCLUDE_DIR AND
|
|
41
|
+
NOT DEFINED LIBSSH2_LIBRARY)
|
|
42
|
+
if(CURL_USE_PKGCONFIG)
|
|
43
|
+
find_package(PkgConfig QUIET)
|
|
44
|
+
pkg_check_modules(_libssh2 ${_libssh2_pc_requires})
|
|
45
|
+
endif()
|
|
46
|
+
if(NOT _libssh2_FOUND AND CURL_USE_CMAKECONFIG)
|
|
47
|
+
find_package(libssh2 CONFIG QUIET)
|
|
48
|
+
endif()
|
|
49
|
+
endif()
|
|
50
|
+
|
|
51
|
+
if(_libssh2_FOUND AND _libssh2_INCLUDE_DIRS)
|
|
52
|
+
set(Libssh2_FOUND TRUE)
|
|
53
|
+
set(LIBSSH2_FOUND TRUE)
|
|
54
|
+
set(LIBSSH2_VERSION ${_libssh2_VERSION})
|
|
55
|
+
if(LIBSSH2_USE_STATIC_LIBS)
|
|
56
|
+
set(_libssh2_CFLAGS "${_libssh2_STATIC_CFLAGS}")
|
|
57
|
+
set(_libssh2_INCLUDE_DIRS "${_libssh2_STATIC_INCLUDE_DIRS}")
|
|
58
|
+
set(_libssh2_LIBRARY_DIRS "${_libssh2_STATIC_LIBRARY_DIRS}")
|
|
59
|
+
set(_libssh2_LIBRARIES "${_libssh2_STATIC_LIBRARIES}")
|
|
60
|
+
endif()
|
|
61
|
+
message(STATUS "Found Libssh2 (via pkg-config): ${_libssh2_INCLUDE_DIRS} (found version \"${LIBSSH2_VERSION}\")")
|
|
62
|
+
elseif(libssh2_CONFIG)
|
|
63
|
+
set(Libssh2_FOUND TRUE)
|
|
64
|
+
set(LIBSSH2_FOUND TRUE)
|
|
65
|
+
set(LIBSSH2_VERSION ${libssh2_VERSION})
|
|
66
|
+
if(LIBSSH2_USE_STATIC_LIBS)
|
|
67
|
+
set(_libssh2_LIBRARIES libssh2::libssh2_static)
|
|
68
|
+
else()
|
|
69
|
+
set(_libssh2_LIBRARIES libssh2::libssh2)
|
|
70
|
+
endif()
|
|
71
|
+
message(STATUS "Found Libssh2 (via CMake Config): ${libssh2_CONFIG} (found version \"${LIBSSH2_VERSION}\")")
|
|
72
|
+
else()
|
|
73
|
+
find_path(LIBSSH2_INCLUDE_DIR NAMES "libssh2.h")
|
|
74
|
+
if(LIBSSH2_USE_STATIC_LIBS)
|
|
75
|
+
find_library(LIBSSH2_LIBRARY NAMES "ssh2_static" "libssh2_static" "ssh2" "libssh2")
|
|
76
|
+
else()
|
|
77
|
+
find_library(LIBSSH2_LIBRARY NAMES "ssh2" "libssh2")
|
|
78
|
+
endif()
|
|
79
|
+
|
|
80
|
+
unset(LIBSSH2_VERSION CACHE)
|
|
81
|
+
if(LIBSSH2_INCLUDE_DIR AND EXISTS "${LIBSSH2_INCLUDE_DIR}/libssh2.h")
|
|
82
|
+
set(_version_regex "#[\t ]*define[\t ]+LIBSSH2_VERSION[\t ]+\"([^\"]*)\"")
|
|
83
|
+
file(STRINGS "${LIBSSH2_INCLUDE_DIR}/libssh2.h" _version_str REGEX "${_version_regex}")
|
|
84
|
+
string(REGEX REPLACE "${_version_regex}" "\\1" _version_str "${_version_str}")
|
|
85
|
+
set(LIBSSH2_VERSION "${_version_str}")
|
|
86
|
+
unset(_version_regex)
|
|
87
|
+
unset(_version_str)
|
|
88
|
+
endif()
|
|
89
|
+
|
|
90
|
+
include(FindPackageHandleStandardArgs)
|
|
91
|
+
find_package_handle_standard_args(Libssh2
|
|
92
|
+
REQUIRED_VARS
|
|
93
|
+
LIBSSH2_INCLUDE_DIR
|
|
94
|
+
LIBSSH2_LIBRARY
|
|
95
|
+
VERSION_VAR
|
|
96
|
+
LIBSSH2_VERSION
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
if(LIBSSH2_FOUND)
|
|
100
|
+
set(_libssh2_INCLUDE_DIRS ${LIBSSH2_INCLUDE_DIR})
|
|
101
|
+
set(_libssh2_LIBRARIES ${LIBSSH2_LIBRARY})
|
|
102
|
+
endif()
|
|
103
|
+
|
|
104
|
+
mark_as_advanced(LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY)
|
|
105
|
+
endif()
|
|
106
|
+
|
|
107
|
+
if(LIBSSH2_FOUND)
|
|
108
|
+
if(NOT TARGET CURL::libssh2)
|
|
109
|
+
add_library(CURL::libssh2 INTERFACE IMPORTED)
|
|
110
|
+
set_target_properties(CURL::libssh2 PROPERTIES
|
|
111
|
+
INTERFACE_LIBCURL_PC_MODULES "${_libssh2_pc_requires}"
|
|
112
|
+
INTERFACE_COMPILE_OPTIONS "${_libssh2_CFLAGS}"
|
|
113
|
+
INTERFACE_INCLUDE_DIRECTORIES "${_libssh2_INCLUDE_DIRS}"
|
|
114
|
+
INTERFACE_LINK_DIRECTORIES "${_libssh2_LIBRARY_DIRS}"
|
|
115
|
+
INTERFACE_LINK_LIBRARIES "${_libssh2_LIBRARIES}")
|
|
116
|
+
endif()
|
|
117
|
+
endif()
|