How to specify CMake cache variable CMAKE INSTALL PREFIX in CMakeLists.txt

How to specify CMake cache variable CMAKE INSTALL PREFIX so that I dont have to specify the ITK build directory whenever I am building a new ITK source directory

Hi @Neerajan_S,

If you are using cmake from the command line, specify CMake cache variables with the -D flag, e.g.

cmake -DCMAKE_INSTALL_PREFIX=$HOME/work/install-prefix ~/work/src/ITK

Hope this helps,
Matt

1 Like