CMAKE_INSTALL_PREFIX environment variable - doesn't work?

Viewed 11686

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?

2 Answers
Related