aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/aliyun-oss-cpp-sdk
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/aliyun-oss-cpp-sdk
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/aliyun-oss-cpp-sdk')
-rw-r--r--vcpkg/ports/aliyun-oss-cpp-sdk/0001-dependency-and-targets.patch66
-rw-r--r--vcpkg/ports/aliyun-oss-cpp-sdk/0002-unofficial-export.cmake26
-rw-r--r--vcpkg/ports/aliyun-oss-cpp-sdk/0003-suppress-fmt-warning.patch13
-rw-r--r--vcpkg/ports/aliyun-oss-cpp-sdk/disable-werror.diff12
-rw-r--r--vcpkg/ports/aliyun-oss-cpp-sdk/portfile.cmake26
-rw-r--r--vcpkg/ports/aliyun-oss-cpp-sdk/vcpkg.json24
6 files changed, 167 insertions, 0 deletions
diff --git a/vcpkg/ports/aliyun-oss-cpp-sdk/0001-dependency-and-targets.patch b/vcpkg/ports/aliyun-oss-cpp-sdk/0001-dependency-and-targets.patch
new file mode 100644
index 0000000..cadf4dc
--- /dev/null
+++ b/vcpkg/ports/aliyun-oss-cpp-sdk/0001-dependency-and-targets.patch
@@ -0,0 +1,66 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ea0d8d6..2a853a0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -78,8 +78,8 @@ if (${TARGET_OS} STREQUAL "WINDOWS")
+ set(CLIENT_INCLUDE_DIRS
+ ${CMAKE_SOURCE_DIR}/third_party/include)
+ else()
+- include(FindCURL)
+- include(FindOpenSSL)
++ find_package(CURL CONFIG REQUIRED)
++ find_package(OpenSSL REQUIRED)
+
+ if(NOT CURL_FOUND)
+ message(FATAL_ERROR "Could not find curl")
+diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt
+index 28d04c2..d5d715d 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
+@@ -173,6 +180,9 @@ if (BUILD_SHARED_LIBS)
+ 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 +220,18 @@ 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-targets
+ 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-targets
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ )
+-endif()
+\ No newline at end of file
++endif()
++
++include(0002-unofficial-export.cmake)
diff --git a/vcpkg/ports/aliyun-oss-cpp-sdk/0002-unofficial-export.cmake b/vcpkg/ports/aliyun-oss-cpp-sdk/0002-unofficial-export.cmake
new file mode 100644
index 0000000..e049152
--- /dev/null
+++ b/vcpkg/ports/aliyun-oss-cpp-sdk/0002-unofficial-export.cmake
@@ -0,0 +1,26 @@
+
+install(
+ EXPORT unofficial-aliyun-oss-cpp-sdk-targets
+ NAMESPACE unofficial::aliyun-oss-cpp-sdk::
+ DESTINATION share/unofficial-aliyun-oss-cpp-sdk
+)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-aliyun-oss-cpp-sdk-config.cmake.in" [[
+@PACKAGE_INIT@
+include(CMakeFindDependencyMacro)
+find_dependency(CURL REQUIRED)
+find_dependency(OpenSSL REQUIRED)
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-aliyun-oss-cpp-sdk-targets.cmake")
+]]
+)
+
+include(CMakePackageConfigHelpers)
+configure_package_config_file("${CMAKE_CURRENT_BINARY_DIR}/unofficial-aliyun-oss-cpp-sdk-config.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/unofficial-aliyun-oss-cpp-sdk-config.cmake"
+ INSTALL_DESTINATION "share/unofficial-aliyun-oss-cpp-sdk"
+)
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/unofficial-aliyun-oss-cpp-sdk-config.cmake"
+ DESTINATION "share/unofficial-aliyun-oss-cpp-sdk"
+)
diff --git a/vcpkg/ports/aliyun-oss-cpp-sdk/0003-suppress-fmt-warning.patch b/vcpkg/ports/aliyun-oss-cpp-sdk/0003-suppress-fmt-warning.patch
new file mode 100644
index 0000000..ac43d69
--- /dev/null
+++ b/vcpkg/ports/aliyun-oss-cpp-sdk/0003-suppress-fmt-warning.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ea0d8d6..2a853a0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -119,7 +119,7 @@ else()
+ endif()
+
+ list(APPEND SDK_COMPILER_FLAGS "-Wall" "-Werror" "-pedantic" "-Wextra")
+-
++ list(APPEND SDK_COMPILER_FLAGS "-Wno-error=deprecated-declarations")
+ if (ENABLE_COVERAGE)
+ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
diff --git a/vcpkg/ports/aliyun-oss-cpp-sdk/disable-werror.diff b/vcpkg/ports/aliyun-oss-cpp-sdk/disable-werror.diff
new file mode 100644
index 0000000..8537604
--- /dev/null
+++ b/vcpkg/ports/aliyun-oss-cpp-sdk/disable-werror.diff
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ea0d8d6..c04ec99 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -127,6 +127,7 @@ else()
+ endif()
+ endif()
+
++list(REMOVE_ITEM SDK_COMPILER_FLAGS "-Werror")
+
+ if (BUILD_SHARED_LIBS)
+ set(STATIC_LIB_SUFFIX "-static")
diff --git a/vcpkg/ports/aliyun-oss-cpp-sdk/portfile.cmake b/vcpkg/ports/aliyun-oss-cpp-sdk/portfile.cmake
new file mode 100644
index 0000000..72dcf5d
--- /dev/null
+++ b/vcpkg/ports/aliyun-oss-cpp-sdk/portfile.cmake
@@ -0,0 +1,26 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO aliyun/aliyun-oss-cpp-sdk
+ REF "${VERSION}"
+ SHA512 7773961ad380d28cda96e16ae6491a76e03f0cb5f0c5135b660179dd449d730e1dfffb916489ed60e13815f53566c24cd9cfd8985c468438369341358eeed3bd
+ HEAD_REF master
+ PATCHES
+ 0001-dependency-and-targets.patch
+ 0003-suppress-fmt-warning.patch
+ disable-werror.diff
+)
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/0002-unofficial-export.cmake" DESTINATION "${SOURCE_PATH}/sdk/")
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ DISABLE_PARALLEL_CONFIGURE
+ OPTIONS
+ -DBUILD_SAMPLE=OFF
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT})
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/aliyun-oss-cpp-sdk/vcpkg.json b/vcpkg/ports/aliyun-oss-cpp-sdk/vcpkg.json
new file mode 100644
index 0000000..01f136e
--- /dev/null
+++ b/vcpkg/ports/aliyun-oss-cpp-sdk/vcpkg.json
@@ -0,0 +1,24 @@
+{
+ "name": "aliyun-oss-cpp-sdk",
+ "version": "1.10.0",
+ "port-version": 4,
+ "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": [
+ {
+ "name": "curl",
+ "default-features": false
+ },
+ "openssl",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}