Some info sources say:
You can change the installation directory (prefix) by setting the CMAKE_INSTALL_PREFIX environment variable
If i do in a file:
export CMAKE_INSTALL_PREFIX=$KDEDIR
and then source it, and check if CMAKE_INSTALL_PREFIX
environment variable is set, when i do:
vic@wic:~/kde/build/kde-workspace$ cmake ../../src/kde-workspace/
and then:
vic@wic:~/kde/build/kde-workspace$ make install
it tries to install files to system directories.
If i specify CMAKE_INSTALL_PREFIX
as an argument to cmake:
vic@wic:~/kde/build/kde-workspace$ cmake -DCMAKE_INSTALL_PREFIX=$KDEDIR ../../src/kde-workspace/
then make install
works ok - installs files to $KDEDIR
Is the documentation wrong about the possibility to set environment variables with the same name, or am i doing something wrong?
CMAKE_INSTALL_PREFIX
has to be set as a CMake variable:
cmake -DCMAKE_INSTALL_PREFIX:PATH=/path/to/installation/directory ..
But CMake also supports using the DESTDIR
environment variable:
export DESTDIR=/path/to/installation/directory
make install
CMAKE_INSTALL_PREFIX is a CMake variable, not an environment variable. It can be set with cmake -DCMAKE_INSTALL_PREFIX=yourpath
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With