I don't know whether this is generally true, but I can give an example of an application for which the accepted answer by sakra
does not work properly. If you modify the install directory by modifying DESTDIR
when installing ITK, it will just append DESTDIR
to its already formed install path:
make install DESTDIR=/opt/local
[...]
-- Installing: /opt/local/usr/local/lib/cmake/ITK-4.4/WrapITK/Configuration/Typedefs/itkRenyiEntropy[...]
On the other hand, following this answer by Fraser
will result in proper install paths without recompilation:
cmake -DCMAKE_INSTALL_PREFIX=/opt/local /path/to/ITK_source
make install
[...]
-- Installing: /opt/local/lib/cmake/ITK-4.4/WrapITK/Configuration/Typedefs/itkRenyiEntropy[...]