-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[aliyun-oss-cpp-sdk] add new port #40597
Conversation
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vendored deps in https://github.com/aliyun/aliyun-oss-cpp-sdk/tree/master/sdk/src/external should be replaced with vcpkg deps.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
ports/aliyun-oss-cpp-sdk/unofficial-aliyun-oss-cpp-sdk-config.cmake
Outdated
Show resolved
Hide resolved
All dependencies should be split out and packaged separately https://learn.microsoft.com/en-us/vcpkg/contributing/maintainer-guide#do-not-use-vendored-dependencies
|
Hi, |
+ | ||
+install( | ||
+ EXPORT unofficial-aliyun-oss-cpp-sdk-config | ||
+ NAMESPACE unofficial:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ NAMESPACE unofficial:: | |
+ NAMESPACE unofficial::aliyun-oss-cpp-sdk:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to unofficial::${TARGET_OUTPUT_NAME_PREFIX}. The project use this ${TARGET_OUTPUT_NAME_PREFIX}${PROJECT_NAME} target output name and the project name is cpp-sdk. So the export target name can be the same with the output lib name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any additional targets should be in the unofficial::<port>:: namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's now in the correct namespace. Please check.
find_package(unofficial-aliyun-oss-cpp-sdk CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::aliyun-oss-cpp-sdk)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could not find the header file. And it looks like no public target_include_directories
provided. Could you please give a simple example for testing the CMake config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header files are in default path: alibabacloud/oss/
directory
The port usage failed with following test:
cmake_minimum_required(VERSION 3.25.1)
project(Prj LANGUAGES CXX)
add_executable(main c.cpp)
target_compile_features(main PRIVATE cxx_std_23)
find_package(unofficial-aliyun-oss-cpp-sdk CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::aliyun-oss-cpp-sdk) |
Sorry for my mistake. I have test the port with the source cpp and cmake files:
The output is fine.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The port usage tests pass with the following triplets:
- x64-linux
ports/aliyun-oss-cpp-sdk/vcpkg.json
Outdated
"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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upstream supports many platforms: https://github.com/aliyun/aliyun-oss-cpp-sdk/blob/1.10.0/CMakeLists.txt#L38-L58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi.
I add osx and android support. The source project use bundled libs when build on windows. This may have conflicts when using with vcpkg and also not match the design philosophy of vcpkg .Please check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The port usage tests pass with the following triplets:
- x64-linux
- arm64-osx
Thanks for the new port! I think what upstream is doing with this |
This is badly wrong. Both curl and openssl have vcpkg cmake wrappers which are not activated by The massive problems are probably mitigated by |
Thanks for your comment, it has been modified. |
find_package
calls are REQUIRED, are satisfied byvcpkg.json
's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx.vcpkg.json
matches what upstream says.vcpkg.json
matches what upstream says../vcpkg x-add-version --all
and committing the result.