Use correct cmake variable for prefix.h.in #58911
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
None
Purpose of change
The auto-generated
prefix.h
file introduced in #57984 seems to not actually reflect the value ofCMAKE_INSTALL_PREFIX
, which is the value we actually care about for our prefix.Describe the solution
This adjusts the
prefix.h
template to use that variable instead.Describe alternatives you've considered
None, but anyone more familiar with CMake may catch if there's a better solution here.
Testing
Before this change I was unable to run the game as the configuration directory it would look for would be from a prefix value of
""
, which resolved to relatively random things in different places (and this can be seen by looking at the contents ofprefix.h
). After this change,prefix.h
correctly has a value and everything builds and runs as expected.NOTE: I am doubtful that CI will properly catch issues with this change, as it didn't previously: please test this yourself and make sure that the game successfully starts without a launcher and when not in the root directory of the source. (Tiles also helps since the font error makes it obvious something's broken.)
Additional context