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

Conflicting 'uninstall' targets with CMake #4881

Open
Humminghead opened this issue Feb 22, 2025 · 0 comments
Open

Conflicting 'uninstall' targets with CMake #4881

Humminghead opened this issue Feb 22, 2025 · 0 comments
Labels

Comments

@Humminghead
Copy link

Describe the bug
If you add Poco together with another library via CMake FetchContent_Declare functionality and they both declare an uninstall target cmake will complain with: "add_custom_target cannot create target "uninstall" because another target with the same name already exists."

To Reproduce
Steps to reproduce the behavior (add Poco together with another library via CMake FetchContent_Declare ):

FetchContent_Declare(
    Poco
    GIT_REPOSITORY https://github.com/pocoproject/poco.git
    GIT_TAG main
)

FetchContent_Declare(
    PcapPlusPlus
    GIT_REPOSITORY https://github.com/seladb/PcapPlusPlus.git
    GIT_TAG dev
)

FetchContent_MakeAvailable(    
    PcapPlusPlus
    Poco 
)

Expected behavior
I want use Poco together with PcapPlusPlus library via CMake FetchContent_Declare functionality

Logs
Image

Please add relevant environment information:

  • Ubuntu 20.04
  • POCO Version 1.14.1
  • Third-party product: PcapPlusPlus dev branch (6a49ae5a00b70bbc316b2d2d44205afe91d84021)

Possible solution:
Rename custom target in root CMakeLists.txt:501 from uninstall to uninstall-poco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant