Conversation
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.
Hi,
Building mujoco in nixpkgs, I've just seen a bunch of red flags like
[ 88%] Linking CXX shared library ../../nix/store/m96gkn3ack9i93xi0dqzm71g9baz3p9i-mujoco-3.13.0/lib/libsdf_plugin.so, where/nix/storeis an absolute path.In cmake, the GNUInstallDirs
CMAKE_INSTALL_*DIRvariables can be provided by the end user (or package manager), and therefore they can be absolute.When that is the case, they should not be concatenated after any other path.
This pull request replace
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_*DIR}"uses by${CMAKE_INSTALL_FULL_*DIR}, also provided by GNUInstallDirs, which is able to handle correctly the absolute case.(A nice side-effect of this change is to also handle package relocations: when the user decide to move the package away from build-time
CMAKE_INSTALL_PREFIXafter installation, as this is for example always the case with the conda package manager)In a similar way,
"${CMAKE_INSTALL_*DIR}"are replaced by a a defaultbin/libwhen absolute and concatenated to${CMAKE_BINARY_DIR}.