[Cpp] CMake: use variables for specifying install paths consistently#4109
Merged
[Cpp] CMake: use variables for specifying install paths consistently#4109
Conversation
3f44218 to
54b11cc
Compare
Krzmbrzl
reviewed
Feb 13, 2023
| if(EXISTS LICENSE.txt) | ||
| install(FILES LICENSE.txt | ||
| DESTINATION "share/doc/libantlr4") | ||
| DESTINATION ${CMAKE_INSTALL_DOCDIR}) |
Contributor
There was a problem hiding this comment.
Shouldn't this use an ANTLR-specific sub-directory? 🤔
Contributor
Author
There was a problem hiding this comment.
CMAKE_INSTALL_DOCDIR contains a project specific sub-directory by default, see https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html#result-variables. It defaults to DATAROOTDIR/doc/PROJECT_NAME.
Edit: Maybe the project name should be changed to lower-case so that this matches the old value?
Contributor
There was a problem hiding this comment.
Oh, interesting. Didn't know that.
I wonder whether changing the casing of the project name has other side effects though 🤔
This allows overriding them if needed when the system uses different paths than
usual (e.g. Haiku, which uses "develop/headers" for includes instead of
"include").
Use the standard variable ${CMAKE_INSTALL_INCLUDEDIR} as the base path for the
include directory.
Signed-off-by: Joachim Mairböck <j.mairboeck@gmail.com>
…TALL_DOCDIR available Signed-off-by: Joachim Mairböck <j.mairboeck@gmail.com>
54b11cc to
6ad5a97
Compare
Contributor
Author
|
I rebased this on top of the changes from #4661. |
Contributor
|
@parrt this is sitting here for a while, should it be merged ? |
Member
|
I closed my eyes and hit merge :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This allows overriding them if needed when the system uses different paths than usual (e.g. Haiku, which uses "develop/headers" for includes instead of "include").
Signed-off-by: Joachim Mairböck j.mairboeck@gmail.com