SFML/cmake-sfml-project

Installing the target also installs SFML files

eXpl0it3r opened this issue · 4 comments

It's kind of a common problem with FetchContent that it also pulls in all the install instructions from the fetched content.
There some workarounds with manual add_subdirectory and EXCLUDE_FROM_ALL, not sure what's the best solution.

I've used that workaround before, in particular to avoid installing a testing framework. It works well in my experience.

In this case I think our best option is to simply remove that install command. If a user builds shared libraries, as SFML does by default, they do need to install SFML to use their executable since the assumption is that after installation, the repo used to build the project may get deleted without anything breaking. This template targets users who are likely not shipping programs so I think it's fair to omit any installation code.

What do you think about simply removing that install command? Installing programs with runtime assets is not trivial and is out of the scope of this template so I'd rather not encourage anyone do that.

Makes the template kind of useless for me personally, which would be a shame.

I don't want to scrap together the necessary files from the build directory, whenever I want to put together a clean build.

I don't want to scrap together the necessary files from the build directory, whenever I want to put together a clean build.

I'm not sure what this means.