Duplicated Targets


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?

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.