[sdlsound] Error when adding SDL_Sound using add_subdirectory

Erico P eri0onpm at gmail.com
Sun Nov 15 06:57:52 EST 2020


Hello,

I have this error with SDL_Sound building with CMake:

CMake Error at
cmake-build-debug/_deps/sdlsound_content-src/CMakeLists.txt:207
(add_custom_target):
  add_custom_target cannot create target "uninstall" because another target
  with the same name already exists.

I am building a cross-platform project that uses SDL_Sound, and we
previously had SDL_Sound sources copied in the project, but now we want to
fetch it and build it directly. Sources are added using CMAKE
add_subdirectory.

SDL2 has the uninstall target prefixed with the following:

if(NOT TARGET uninstall)

Maybe a similar approach or adding a prefix so it reads like
"sdlsound_uninstall" would help.

Any ideas on how to fix this?

Regards,

Erico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/sdlsound/attachments/20201115/45e45264/attachment.htm>


More information about the sdlsound mailing list