-
Notifications
You must be signed in to change notification settings - Fork 802
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 GNUInstallDirs for cmake install locations #3150
Changes from 6 commits
66f0a33
9b1eb93
c1c23be
d416379
b705144
a3decb7
94ee707
56c171b
bdc6527
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -11,9 +11,9 @@ | |||||||||||||
# Tell the user project where to find our headers and libraries | ||||||||||||||
get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) | ||||||||||||||
get_filename_component (_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE) | ||||||||||||||
set (@PROJECT_VARIANT_NAME@_INCLUDE_DIRS "${_ROOT}/@INCLUDEDIR@") | ||||||||||||||
set (@PROJECT_VARIANT_NAME@_LIBRARY_DIRS "${_ROOT}/@LIBDIR@") | ||||||||||||||
set (@PROJECT_VARIANT_NAME@_BINARY_DIRS "${_ROOT}/@BINDIR@") | ||||||||||||||
set (@PROJECT_VARIANT_NAME@_INCLUDE_DIRS ${CMAKE_INSTALL_INCLUDEDIR}) | ||||||||||||||
set (@PROJECT_VARIANT_NAME@_LIBRARY_DIRS ${CMAKE_INSTALL_LIBDIR}) | ||||||||||||||
set (@PROJECT_VARIANT_NAME@_BINARY_DIRS ${CMAKE_INSTALL_BINDIR}) | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this should rather be:
Suggested change
as _ROOT must remain referenced There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For absolute paths, there is Now what is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which do we think it should be? I think it is wrong the way it is, too. If these variables should be the include, library, and binary directories of install, then the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
As far as I can see, this is a way to figure out the (actual) installation prefix from where the CMake config file is located.
yeah that was my first thought too. But it seems the existing logic in the file was to make it possibly relocatable. And I hope that what I proposed would make it still possible There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I missed part of the context. Basically @rouault is right, and I see where I will test the PR in the next days. |
||||||||||||||
|
||||||||||||||
set (@PROJECT_VARIANT_NAME@_LIBRARIES @PROJECT_VARIANT_NAME@::proj) | ||||||||||||||
# Read in the exported definition of the library | ||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,5 +101,5 @@ set(ALL_DATA_FILE | |
) | ||
install( | ||
FILES ${ALL_DATA_FILE} | ||
DESTINATION ${DATADIR} | ||
DESTINATION ${PROJ_LIB_PATH} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... but this looks strange. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's after There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The naming isn't straightforward. In the context of cmake, this implies the library install path I think, though we know what |
||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
prefix=@prefix@ | ||
exec_prefix=@exec_prefix@ | ||
libdir=@libdir@ | ||
includedir=@includedir@ | ||
datarootdir=@datarootdir@ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe that's not the best name for data.