Skip to content

Fix exported CMake config - #464

Merged
bradh352 merged 1 commit into
c-ares:mainfrom
dg0yt:cmake
Apr 27, 2022
Merged

Fix exported CMake config#464
bradh352 merged 1 commit into
c-ares:mainfrom
dg0yt:cmake

Conversation

@dg0yt

@dg0yt dg0yt commented Apr 24, 2022

Copy link
Copy Markdown
Contributor

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