# Duplicated Targets

**URL:** <https://discourse.cmake.org/t/duplicated-targets/7666>\
**Category:** Code\
**Created:** [March 13, 2023, 10:24am UTC](https://discourse.cmake.org/t/duplicated-targets/7666 "2023-03-13T10:24:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leon0402](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/l/ccd318/32.png) [@Leon0402](https://discourse.cmake.org/u/Leon0402)\
**Post date:** [March 13, 2023, 10:24am UTC](https://discourse.cmake.org/t/duplicated-targets/7666/1 "2023-03-13T10:24:11Z")

</div>

Hi,

I have the problem that in two projects I use with FetchContent that a duplicated `uninstall` target exists. I cannot really control these projects. Even fixing it somehow it not quite realistic as it wouldn’t be backported to the version I have to use.  
I also know there are some proposals how to fix this issue in cmake with namespaced targets and such stuff.

But what could be a (hacky) workaround right now to fix this issue from within my project?

---

<div class="post-metadata">

**Author:** ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Post date:** [March 13, 2023, 7:22pm UTC](https://discourse.cmake.org/t/duplicated-targets/7666/2 "2023-03-13T19:22:55Z")

</div>

Realistically, if two or more dependencies define the same CMake target, your only real choice at the moment is to make all but one of them an ExternalProject instead of pulling them in via FetchContent.
