Skip to content
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

[liblzma] Generally fix output name #20751

Merged
merged 4 commits into from
Oct 27, 2021
Merged

Conversation

dg0yt
Copy link
Contributor

@dg0yt dg0yt commented Oct 14, 2021

  • What does your PR fix?

    This PR fixes liblzma to not mess with the platform's prefix but simply always use the lzma "namespec" that matches -llzma[d] as used in the .pc file. This fixes library name issues on mingw. The change is complemented by tightening the find_ calls in the exported cmake configuration.
    Another change fixes the warning about the unused CMAKE_DEBUG_POSTFIX variable.

  • Which triplets are supported/not supported? Have you updated the CI baseline?

    unchanged

  • Does your PR follow the maintainer guide?

    yes

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

    yes

@BillyONeal
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JackBoosY JackBoosY added the category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. label Oct 15, 2021
@JackBoosY JackBoosY added the info:reviewed Pull Request changes follow basic guidelines label Oct 20, 2021
@dg0yt dg0yt changed the title [liblzma] Fix mingw lib name [liblzma] Generally fix output name Oct 20, 2021
@JackBoosY JackBoosY removed the info:reviewed Pull Request changes follow basic guidelines label Oct 20, 2021
@dg0yt
Copy link
Contributor Author

dg0yt commented Oct 20, 2021

I had to revise the PR after more testing, and came to a more general fix. I update the initial post. Sorry for the inconvenience.

target_sources(liblzma PRIVATE src/liblzma/liblzma_w32res.rc)
target_include_directories(liblzma PRIVATE windows/vs2019)
# It's liblzma.so or liblzma.dll, not libliblzma.so or lzma.dll.
# Avoid the name lzma.dll because it would conflict with LZMA SDK.
Copy link
Contributor Author

@dg0yt dg0yt Oct 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name lzma.dll wasn't and isn't avoided in vcpkg so far. If desired, we need to set property RUNTIME_OUTPUT_NAMEto liblzma (for win32 but not mingw).

@dg0yt
Copy link
Contributor Author

dg0yt commented Oct 25, 2021

All checks green.

@JackBoosY JackBoosY added the info:reviewed Pull Request changes follow basic guidelines label Oct 26, 2021
@BillyONeal BillyONeal merged commit 48dcbd2 into microsoft:master Oct 27, 2021
@BillyONeal
Copy link
Member

Thanks for the fixes!

@dg0yt dg0yt deleted the liblzma branch November 13, 2021 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants