Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Don't overwrite user-configured custom docdir #480

Merged
merged 1 commit into from
Feb 18, 2022

Conversation

vilhelmgray
Copy link
Contributor

We want to provide a default docdir for PrBoom-Plus, but let's not
overwrite the custom docdir a user may provide.

@fabiangreffrath
Copy link
Collaborator

Could you please add a comment? I know I won't understand this change anymore in a few moths. 😉

@vilhelmgray
Copy link
Contributor Author

I've updated the commit message to matched the discussion we had in daa4544

@vilhelmgray
Copy link
Contributor Author

Oh I'll add a comment in the file as well.

We want to provide a default docdir for PrBoom-Plus, but let's not
overwrite the custom docdir a user may provide.

We can't simply set the ${CMAKE_INSTALL_DOCDIR} in the CMakeLists.txt
file because the GNUInstallDirs has already set the
${CMAKE_INSTALL_DOCDIR} cache variable before a later set command; that
later set command is prevented from changing an already set cache
variable. The way to solve this is to check if ${CMAKE_INSTALL_DOCDIR}
is set before the include(GNUInstallDirs), and then only set the default
location when needed.
Copy link
Collaborator

@fabiangreffrath fabiangreffrath left a comment

Choose a reason for hiding this comment

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

Top, thanks!

@fabiangreffrath fabiangreffrath merged commit 1bc98e2 into coelckers:master Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants