-
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
[libdeflate] New port #29910
[libdeflate] New port #29910
Conversation
7789e71
to
832c4e6
Compare
ports/libdeflate/portfile.cmake
Outdated
zlib LIBDEFLATE_GZIP_SUPPORT | ||
) | ||
|
||
if (${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") |
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.
if (${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") | |
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") |
Correct usage.
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 think we prefer
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC_BUILD)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_BUILD)
over if/else.
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.
@dg0yt Are you sure? When I search for COMPARE[^\n]*VCPKG_LIBRARY_LINKAGE
in the ports directory I get hits in 161 files vs 445 files when searching for if[^\n]*VCPKG_LIBRARY_LINKAGE
;-)
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.
Yes, I'm sure. It is frequently implemented in port modernization.
$ git grep -A1 'if[^\n]*VCPKG_LIBRARY_LINKAGE' ports/ | grep -i ' set' | wc -l
112
And if you look at the context, even some of the remaining set
commands have a different nature, such as selecting particular patches.
We need a generic usage not only
|
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.
So there is no target
libdeflate::libdeflate
, i.e. you cannot simply switch from the tripletx64-windows
tox64-windows-static
. Should I add a patch to add anALIAS
target?
See port zstd: Uniform usage via generator expression.
ports/libdeflate/portfile.cmake
Outdated
zlib LIBDEFLATE_GZIP_SUPPORT | ||
) | ||
|
||
if (${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") |
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 think we prefer
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC_BUILD)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_BUILD)
over if/else.
ok, so we make a mountain out of a molehill - I hope no one is using clang-format with a line limit 😅 find_package(libdeflate CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:libdeflate::libdeflate_shared>,libdeflate::libdeflate_shared,libdeflate::libdeflate_static>) |
Does anyone see why the CI is failing?
|
😆 |
It is possibly to click through from GH ot Azure Pipelines to published artifacts to download logs of the failed build.
The package overwrites |
Maybe this also the answer to the uwp problem: Only the release build fails. |
That should be patched out for vcpkg. |
Oh thx, just searched for |
@@ -3824,6 +3824,9 @@ | |||
"baseline": "1.0.8", | |||
"port-version": 6 | |||
}, | |||
"libdeflate": { | |||
"baseline": "1.17" |
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.
Is it expected that baseline.json
does not define a port-version
?
I started to get warnings in my scripts on vcpkg.link today since this is the only case that does not include the field.
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.
Okay, it seems this will be automatically fixed as all open PRs add the missing field
https://github.com/microsoft/vcpkg/pull/29993/files#r1124389057
find_package
calls are REQUIRED, are satisfied byvcpkg.json
's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxxvcpkg.json
matches what upstream says.vcpkg.json
matches what upstream says../vcpkg x-add-version --all
and committing the result.Unfortunately, the library only creates specific targets for each library linkage type:
So there is no target
libdeflate::libdeflate
, i.e. you cannot simply switch from the tripletx64-windows
tox64-windows-static
. Should I add a patch to add anALIAS
target?