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

Use correct cmake variable for prefix.h.in #58911

Merged
merged 1 commit into from
Jul 4, 2022

Conversation

perryprog
Copy link
Contributor

@perryprog perryprog commented Jul 2, 2022

Summary

None

Purpose of change

The auto-generated prefix.h file introduced in #57984 seems to not actually reflect the value of CMAKE_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 of prefix.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

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jul 2, 2022
@ZhilkinSerg ZhilkinSerg merged commit 4a66e60 into CleverRaven:master Jul 4, 2022
@perryprog perryprog deleted the make-cmake-make branch July 5, 2022 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants