mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[aliyun-oss-cpp-sdk] add new port (#40597)
Co-authored-by: 牧亦 <luanjun.lj@alibaba-inc.com>
This commit is contained in:
parent
4c2b54e052
commit
29b2ea2d4b
58
ports/aliyun-oss-cpp-sdk/cmake-export.patch
Normal file
58
ports/aliyun-oss-cpp-sdk/cmake-export.patch
Normal file
@ -0,0 +1,58 @@
|
||||
diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt
|
||||
index 28d04c2..c7b2e6c 100644
|
||||
--- a/sdk/CMakeLists.txt
|
||||
+++ b/sdk/CMakeLists.txt
|
||||
@@ -146,6 +146,13 @@ set_target_properties(${PROJECT_NAME}${STATIC_LIB_SUFFIX}
|
||||
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}${PROJECT_NAME}${STATIC_LIB_SUFFIX}
|
||||
)
|
||||
|
||||
+target_include_directories(${PROJECT_NAME}${STATIC_LIB_SUFFIX}
|
||||
+ PUBLIC $<INSTALL_INTERFACE:include>
|
||||
+)
|
||||
+
|
||||
+target_link_libraries(${PROJECT_NAME}${STATIC_LIB_SUFFIX} ${CRYPTO_LIBS})
|
||||
+target_link_libraries(${PROJECT_NAME}${STATIC_LIB_SUFFIX} ${CLIENT_LIBS})
|
||||
+
|
||||
target_include_directories(${PROJECT_NAME}${STATIC_LIB_SUFFIX}
|
||||
PRIVATE include
|
||||
PRIVATE include/alibabacloud/oss
|
||||
@@ -172,7 +179,11 @@ if (BUILD_SHARED_LIBS)
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}${PROJECT_NAME}
|
||||
)
|
||||
-
|
||||
+
|
||||
+ target_include_directories(${PROJECT_NAME}
|
||||
+ PUBLIC $<INSTALL_INTERFACE:include>
|
||||
+ )
|
||||
+
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE include
|
||||
PRIVATE include/alibabacloud/oss
|
||||
@@ -210,16 +221,22 @@ install(FILES ${sdk_encryption_header}
|
||||
install(FILES ${sdk_public_header}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/oss)
|
||||
|
||||
-install(TARGETS ${PROJECT_NAME}${STATIC_LIB_SUFFIX}
|
||||
+install(TARGETS ${PROJECT_NAME}${STATIC_LIB_SUFFIX} EXPORT unofficial-aliyun-oss-cpp-sdk-config
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
-install(TARGETS ${PROJECT_NAME}
|
||||
+install(TARGETS ${PROJECT_NAME} EXPORT unofficial-aliyun-oss-cpp-sdk-config
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
+endif()
|
||||
+
|
||||
+install(
|
||||
+ EXPORT unofficial-aliyun-oss-cpp-sdk-config
|
||||
+ NAMESPACE unofficial::aliyun-oss-cpp-sdk::
|
||||
+ DESTINATION share/unofficial-aliyun-oss-cpp-sdk
|
||||
+)
|
24
ports/aliyun-oss-cpp-sdk/portfile.cmake
Normal file
24
ports/aliyun-oss-cpp-sdk/portfile.cmake
Normal file
@ -0,0 +1,24 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO aliyun/aliyun-oss-cpp-sdk
|
||||
REF "${VERSION}"
|
||||
SHA512 7773961ad380d28cda96e16ae6491a76e03f0cb5f0c5135b660179dd449d730e1dfffb916489ed60e13815f53566c24cd9cfd8985c468438369341358eeed3bd
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
cmake-export.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_SAMPLE=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT})
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
4
ports/aliyun-oss-cpp-sdk/usage
Normal file
4
ports/aliyun-oss-cpp-sdk/usage
Normal file
@ -0,0 +1,4 @@
|
||||
The package aliyun-oss-cpp-sdk provides CMake targets:
|
||||
|
||||
find_package(unofficial-aliyun-oss-cpp-sdk CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE unofficial::aliyun-oss-cpp-sdk::cpp-sdk)
|
20
ports/aliyun-oss-cpp-sdk/vcpkg.json
Normal file
20
ports/aliyun-oss-cpp-sdk/vcpkg.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "aliyun-oss-cpp-sdk",
|
||||
"version": "1.10.0",
|
||||
"description": "Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring massive capacity, security, a low cost, and high reliability.",
|
||||
"homepage": "https://github.com/aliyun/aliyun-oss-cpp-sdk",
|
||||
"license": "Apache-2.0",
|
||||
"supports": "linux | osx | android",
|
||||
"dependencies": [
|
||||
"curl",
|
||||
"openssl",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
9
versions/a-/aliyun-oss-cpp-sdk.json
Normal file
9
versions/a-/aliyun-oss-cpp-sdk.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "cb847011bd7b34fe9ce8ce2ebf15141de1588003",
|
||||
"version": "1.10.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
@ -80,6 +80,10 @@
|
||||
"baseline": "3.10.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"aliyun-oss-cpp-sdk": {
|
||||
"baseline": "1.10.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"allegro5": {
|
||||
"baseline": "5.2.9.1",
|
||||
"port-version": 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user