pcl icon indicating copy to clipboard operation
pcl copied to clipboard

Use GNUInstallDirs to set installation locations

Open waebbl opened this issue 3 years ago • 5 comments

The use of GNUInstallDirs ensures, the files are installed in common locations on all platforms.

Closes: https://github.com/PointCloudLibrary/pcl/issues/5496 Signed-off-by: Bernd Waibel [email protected]

waebbl avatar Oct 28 '22 11:10 waebbl

I'm not that known to linux directory structure, but it seems to be the default to use GNUInstallDirs. So looks good to me.

larshg avatar Nov 01 '22 19:11 larshg

This change would be nice to get merged, as using GNUInstallDirs simplifies the split output story for packaging in Nix. One additional piece could be to eliminate the use of the PCL_ROOT variable altogether, particularly in blocks like this one:

https://github.com/PointCloudLibrary/pcl/blob/aa7c6795227d443fe22355d1fac4c5afe7d51274/PCLConfig.cmake.in#L408-L426

Rather than assuming the built libraries are relative to some common root in the installed case, as this line does:

set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@")

I believe it would be preferred to use the CMAKE_INSTALL_LIBDIR variable here, which CMake provides via its GNUInstallDirs implementation.

See: https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

mikepurvis avatar Feb 06 '23 22:02 mikepurvis

@jspricke and @UnaNancyOwen Can you chime in on this change how it would work on debian and windows?

larshg avatar Feb 12 '24 18:02 larshg

@larshg I checked this changes. It almost works fine on Windows and All-in-one Installer! 👍

For one thing from me, the installation directory path of the documentations seems to be just a little different from the path required by the generate script for all-in-one installer. Therefore, the link set by installer is broken. Perhaps, it should be corrected on these lines. https://github.com/PointCloudLibrary/pcl/blob/18fe557eb3b5ef568da024d071923d49222cb3ba/cmake/cpack_options.cmake.in#L18-L22

pcl-@PCL_VERSION_MAJOR@.@PCL_VERSION_MINOR@ -> PCL

  set(CPACK_NSIS_MENU_LINKS
-             "share/doc/pcl-@PCL_VERSION_MAJOR@.@PCL_VERSION_MINOR@/tutorials/html/index.html" "Tutorials"
-             "share/doc/pcl-@PCL_VERSION_MAJOR@.@PCL_VERSION_MINOR@/tutorials/html/sources" "Tutorials sources"
-             "share/doc/pcl-@PCL_VERSION_MAJOR@.@PCL_VERSION_MINOR@/html/pcl-@PCL_VERSION_MAJOR@.@[email protected]" "Documentation"
+             "share/doc/PCL/tutorials/html/index.html" "Tutorials"
+             "share/doc/PCL/tutorials/html/sources" "Tutorials sources"
+             "share/doc/PCL/html/pcl-@PCL_VERSION_MAJOR@.@[email protected]" "Documentation"
              "http://www.pointclouds.org" "PCL Website")

UnaNancyOwen avatar Feb 25 '24 07:02 UnaNancyOwen

fine with me.

jspricke avatar Feb 25 '24 07:02 jspricke