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

Use relative install paths for headers #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FtZPetruska
Copy link

Using relative paths in the calls to install allows the same build to be installed to several location without reconfiguring the project. This enables flexibility similarly to autotools':

./configure --prefix=/
make install DESTDIR=/foo
make install DESTDIR=/bar

Without this change:

cmake -S . -B build -D CMAKE_INSTALL_PREFIX=/foo -D CMAKE_TOOLCHAIN_FILE=...
cmake --build build
cmake --install build # All files installed in /foo
cmake --install build --prefix /bar # Library installed in /bar, headers installed in /foo

With this change:

cmake -S . -B build -D CMAKE_INSTALL_PREFIX=/foo -D CMAKE_TOOLCHAIN_FILE=...
cmake --build build
cmake --install build # All files installed in /foo
cmake --install build --prefix /bar # All files installed in /bar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant