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

Don't install SFML when installing the project #28

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

JonnyPtn
Copy link
Contributor

@JonnyPtn JonnyPtn commented Nov 7, 2023

Just a case of adding the subdirectory with EXCLUDE_FROM_ALL. In cmake 3.28 you can pass this property directly to fetchcontent which is nicer but presume we're a way off using that version As discussed, we are happy to move to 3.28 as part of this

Also had to change the fetch content name to lowercase, which is required for the source/binary dir variables to work correctly and is good practice anyway.

closes #6

edit: bonus side-effect of users not having to build sfml modules they aren't using

@eXpl0it3r eXpl0it3r added the bug Something isn't working label Nov 8, 2023
CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Member

@eXpl0it3r eXpl0it3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it makes sense, as it otherwise makes the install target kind of unusable

CMakeLists.txt Outdated Show resolved Hide resolved
@JonnyPtn
Copy link
Contributor Author

JonnyPtn commented Aug 23, 2024

didn't realise the decision had been made not to support installation in the template a few months ago (before changes were requested here) which makes this kind of redundant (edit: suppose not entirely redundant as it makes it generally more efficient)

Seems silly imo to not support it, it's one of the most common questions new users ask about and would be useful for many people with minimal effort

@ChrisThrasher ChrisThrasher merged commit ed067a2 into SFML:master Aug 29, 2024
10 checks passed
@ChrisThrasher
Copy link
Member

Raising the CMake requirement beyond CMake 3.22 means that Ubuntu 22 users no longer have a seamless experience using this template. There are a number of ways to remedy this in decreasing order of what I would personally recommend.

  1. Upgrade to Ubuntu 24 LTS. This ships with CMake 3.28.
  2. Add Kitware's Apt repository which will give you the latest release of CMake.
  3. Tweak the template's CMakeLists.txt to remove the use of EXCLUDE_FROM_ALL and SYSTEM.
  4. Use an older commit of the template before this PR was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installing the target also installs SFML files
3 participants