-
Notifications
You must be signed in to change notification settings - Fork 976
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
Incorrect install paths #764
Comments
Can you cite the section of the manual that you're referring to? I took a quick look over the script, and just reread the CMAKE_INSTALL_PREFIX documentation. There is no mention of behavioral changes relating to absolute paths. The GNUInstallDirs documentation is pretty clear that CMAKE_INSTALL_LIBDIR is not absolute and is built using CMAKE_INSTALL_PREFIX. CMAKE_INSTALL_FULL_LIBDIR is absolute, but the CMAKE_INSTALL_LIBDIR is not. Specifying an absolute path as the value of that variable appears incorrect by my reading. The CMake install() code in Draco is ancient, and I see from looking at the documentation that things have changed, but the problem you're having downstream is clearly related to the behavior of Nix, which is not typical:
CMAKE_INSTALL_LIBDIR, according to CMake docs, is a relative path (GNUInstallDirs doc):
Edit to add: Looking at this a bit more it does seem that the install for Draco could use some updates-- I would be happy to look at a PR that makes this work a little better for your use case. The Draco install rules were not written with a fully custom install path structure in mind. |
My bad, the part I was thinking of is about the destination parameter to
Draco is explicitly prepending the prefix to all of the paths, i.e.:
Whereas the same result would be obtained with simply:
...except in the case where |
@jansol Thank you for the PR. I haven't had a chance to look it over yet, but we'll try to get this pulled in for the next release. |
- Fixed omission of draco_version.h when installed in static configurations. - Remove DracoConfig.cmake: it was broken and we actually use draco-config.cmake. - Update FindDraco.cmake so it actually has a chance of working properly. Fixed usage of find_path() and subsequent related errors. - Correct the usage of CMakePackageConfigHelpers in installation target setup and the config template. - Add a CMake version file. - Normalize the Draco variables exposed in CMake. - draco_FOUND -> DRACO_FOUND - DRACO_INCLUDE_DIRS, draco_INCLUDE_DIRS -> DRACO_INCLUDE_DIR - DRACO_LIBRARIES, draco_LIBRARIES -> DRACO_LIBRARY - DRACO_LIBRARY_DIRS, draco_LIBRARY_DIRS -> DRACO_LIBRARY_DIR - draco_VERSION_STRING -> DRACO_VERSION - Use full paths variants of GNUInstallDirs variables to init our install paths. Fixes #764
- Fixed omission of draco_version.h when installed in static configurations. - Remove DracoConfig.cmake: it was broken and we actually use draco-config.cmake. - Update FindDraco.cmake so it actually has a chance of working properly. Fixed usage of find_path() and subsequent related errors. - Correct the usage of CMakePackageConfigHelpers in installation target setup and the config template. - Add a CMake version file. - Normalize the Draco variables exposed in CMake. - draco_FOUND -> DRACO_FOUND - DRACO_INCLUDE_DIRS, draco_INCLUDE_DIRS -> DRACO_INCLUDE_DIR - DRACO_LIBRARIES, draco_LIBRARIES -> DRACO_LIBRARY - DRACO_LIBRARY_DIRS, draco_LIBRARY_DIRS -> DRACO_LIBRARY_DIR - draco_VERSION_STRING -> DRACO_VERSION - Use full paths variants of GNUInstallDirs variables to init our install paths. Fixes #764
- Fixed omission of draco_version.h when installed in static configurations. - Remove DracoConfig.cmake: it was broken and we actually use draco-config.cmake. - Update FindDraco.cmake so it actually has a chance of working properly. Fixed usage of find_path() and subsequent related errors. - Correct the usage of CMakePackageConfigHelpers in installation target setup and the config template. - Add a CMake version file. - Normalize the Draco variables exposed in CMake. - draco_FOUND -> DRACO_FOUND - DRACO_INCLUDE_DIRS, draco_INCLUDE_DIRS -> DRACO_INCLUDE_DIR - DRACO_LIBRARIES, draco_LIBRARIES -> DRACO_LIBRARY - DRACO_LIBRARY_DIRS, draco_LIBRARY_DIRS -> DRACO_LIBRARY_DIR - draco_VERSION_STRING -> DRACO_VERSION - Use full path variants of GNUInstallDirs variables to init our install paths. Fixes #764 * Add install() for draco-version.cmake.
- Fixed omission of draco_version.h when installed in static configurations. - Remove DracoConfig.cmake: it was broken and we actually use draco-config.cmake. - Update FindDraco.cmake so it actually has a chance of working properly. Fixed usage of find_path() and subsequent related errors. - Correct the usage of CMakePackageConfigHelpers in installation target setup and the config template. - Add a CMake version file. - Normalize the Draco variables exposed in CMake. - draco_FOUND -> DRACO_FOUND - DRACO_INCLUDE_DIRS, draco_INCLUDE_DIRS -> DRACO_INCLUDE_DIR - DRACO_LIBRARIES, draco_LIBRARIES -> DRACO_LIBRARY - DRACO_LIBRARY_DIRS, draco_LIBRARY_DIRS -> DRACO_LIBRARY_DIR - draco_VERSION_STRING -> DRACO_VERSION - Use full path variants of GNUInstallDirs variables to init our install paths. Fixes google#764 * Add install() for draco-version.cmake.
When given an absolute path for e.g.
CMAKE_INSTALL_LIBDIR
, cmake does NOT prependCMAKE_INSTALL_PREFIX
, that is only done for relative paths (see the CMake manual)However path wrangling in
draco_install.cmake
always unconditionally prepends the prefix, leading to broken installs e.g. on NixOS. Nix always passes absolute paths to cmake for the specific install directories, as they may have different prefixes in order to split large packages into smaller ones (such as having a separate package for documentation or data files).The text was updated successfully, but these errors were encountered: