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

[configuration and compilation] Using GNUInstallDirs to determine installation locations? #5496

Open
waebbl opened this issue Oct 28, 2022 · 0 comments · May be fixed by #5497
Open

[configuration and compilation] Using GNUInstallDirs to determine installation locations? #5496

waebbl opened this issue Oct 28, 2022 · 0 comments · May be fixed by #5497
Labels
kind: request Type of issue status: triage Labels incomplete

Comments

@waebbl
Copy link

waebbl commented Oct 28, 2022

Is your feature request related to a problem? Please describe.

We received a bug report on Gentoo Linux for files not installed to FHS compliant directories[1], related to documentation files. During my research, I noticed that the cmake config files are installed under /usr/share/pcl-1.12 which is also an unusual directory for this, which could lead to issues, see for example #4661. Many Linux distributions use /usr/lib*/cmake/<package> or /usr/share/cmake/<package> for lib-agnostic cmake config and modules files.

[1] https://bugs.gentoo.org/853886

Context

Having a mechanism for a unified installation, which keeps to general standards (FHS) would improve the project. The GNUInstallDirs cmake mechanism ensures that sensible default values for all platforms are chosen.

Expected behavior

Independently of the used platform or distribution, the installation directories should comply with the defined standards.

Current Behavior

Depending on the distribution used, some files might get installed into directories which are not covered by standards.

Describe the solution you'd like

I will provide a PR for you to consider, which uses GNUInstallDirs and some additional guards in pcl_utils.cmake.

Describe alternatives you've considered

Adding more guards to the SET_INSTALL_DIRS function, without using GNUInstallDirs, so the installation directories can be passed on the cmake command line. This is implemented in my PR in addition to using GNUInstallDirs.

Additional context

The patch of the cmake config files is hardcoded in the PCLConfig.cmake.in file and I have adapted it in my PR. It should, however, be possible to use the CMakePackageConfigHelpers module to ease the process of creating cmake files for the package and avoid hardcoding any paths. The module will take care of using the correct paths. My PR doesn't cover using this.

@waebbl waebbl added kind: request Type of issue status: triage Labels incomplete labels Oct 28, 2022
waebbl added a commit to waebbl/pcl that referenced this issue Oct 28, 2022
The use of GNUInstallDirs ensures, the files are installed
in common locations on all platforms.

Closes: PointCloudLibrary#5496
Signed-off-by: Bernd Waibel <[email protected]>
waebbl added a commit to waebbl/pcl that referenced this issue Oct 28, 2022
The use of GNUInstallDirs ensures, the files are installed
in common locations on all platforms.

Closes: PointCloudLibrary#5496
Signed-off-by: Bernd Waibel <[email protected]>
waebbl added a commit to waebbl/pcl that referenced this issue Oct 28, 2022
The use of GNUInstallDirs ensures, the files are installed
in common locations on all platforms.

Closes: PointCloudLibrary#5496
Signed-off-by: Bernd Waibel <[email protected]>
@waebbl waebbl linked a pull request Oct 28, 2022 that will close this issue
@waebbl waebbl changed the title [configuration and complication] Using GNUInstallDirs to determin installation locations? [configuration and compilation] Using GNUInstallDirs to determin installation locations? Oct 28, 2022
@waebbl waebbl changed the title [configuration and compilation] Using GNUInstallDirs to determin installation locations? [configuration and compilation] Using GNUInstallDirs to determine installation locations? Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: request Type of issue status: triage Labels incomplete
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant