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

Fix exported CMake config #464

Merged
merged 1 commit into from
Apr 27, 2022
Merged

Fix exported CMake config #464

merged 1 commit into from
Apr 27, 2022

Conversation

dg0yt
Copy link
Contributor

@dg0yt dg0yt commented Apr 24, 2022

User projects may call 'find_package(c-ares)' multiple times, (e.g. via dependencies), but targets must be created only once. Otherwise users face this (microsoft/vcpkg#24367):

  add_library cannot create imported target "c-ares::cares_static" because
  another target with the same name already exists.
Call Stack (most recent call first):
  /home/xxxx/vcpkg/installed/x64-linux/share/c-ares/c-ares-config.cmake:29 (add_library)

In addition, shared and static target must be treated independently, to match the capabilites of the build system.

User projects may call 'find_package(c-ares)' multiple times (e.g.
via dependencies), but targets must be created only once.
Shared and static target must be treated independently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants