-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[serf] add new port #37829
[serf] add new port #37829
Conversation
Upstream has a cmake buildsystem. Is there a good reason to add a vendored msbuild? |
The CMake build system is currently only available in the development version (trunk) and has not been officially released yet. In the stable version, SCons is the only available build system. |
The above are some modifications to deprecated functions and redundant code. In addition, there is another problem. I found that this port provides neither |
I added package-config, usage, and fixed that modifications about deprecated functions and redundant code. |
I've implemented the corrections you pointed out and it's now ready for review. Additionally, I've made a minor adjustment to the target name: I've appended the major version name to it, changing it from 'serf' to 'serf-1'. |
usage:
When testing usage, the following error occurs:
CMakeLists.txtcmake_minimum_required (VERSION 3.8) set(CMAKE_TOOLCHAIN_FILE "G:/serf/scripts/buildsystems/vcpkg.cmake") CMakeUsage.cpp#include <iostream> #include "serf.h" |
Thank you! I found and fixed this problem; I forgot to specify the INTERFACE_INCLUDE_DIRECTORIES property. |
The usage test passed on
|
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.
Do CMake config and target name match the future upstream name, or are they unofficial
?
Does it work properly in single-config mode?
Doesn't it need find_dependency
and INTERFACE_LINK_LIBRARIES
for static linkage?
Note: I will be converting your PR to draft status. When you're ready, please revert to "ready for review". |
Thank you! Today I'm going to fix these problems. |
ports/serf/serf-config.cmake
Outdated
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") | ||
SET(INTERFACE_LINK_LIBRARIES "ZLIB::ZLIB;unofficial::apr::apr-1;unofficial::apr::aprapp-1;OpenSSL::SSL;OpenSSL::Crypto") | ||
else() | ||
SET(INTERFACE_LINK_LIBRARIES "ZLIB::ZLIB;unofficial::apr::libapr-1;unofficial::apr::libaprapp-1;OpenSSL::SSL;OpenSSL::Crypto") | ||
endif() |
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.
This is not entirely correct if users override linkage per port.
The correct way is to use target expressions as in
$<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>
(TBH I would prefer the unofficial config of apr to provide uniform target names...)
@rinrab Is there any new progress? Please resolve the conflict. Finally, if you have finished editing, click “Ready for review”. |
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.