CMAKE_INSTALL_PREFIX environment variable - doesn't work?
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