2012/5/26 vivek goel <[email protected]>: > I am building another program inside my cmake which usage autotools for > generating it's make file. > > I want to run it's configure like ./configure > --prefix=${CMAKE_INSTALL_PREFIX}. > But when I am changing the DESTDIR for my project. CMAKE_INSTALL_PREFIX is > not getting changed. > So everytime configure is running as > ./configure --prefix=/usr/local > Is it a bug ? > or Should I use DESTDIR variable instead of using CMAKE_INSTALL_PREFIX > or Should I set -DCMAKE_INSTALL_PREFIX whenever I am changing DESTDIR. > > What is the recommended way ?
Both, but for different purpose. CMAKE_INSTALL_PREFIX should be used to control install prefix at **CONFIGURE time** whereas DESTDIR is an **INSTALL time** mechanism. so you can perfectly do: cmake -DCMAKE_INSTALL_PREFIX=/usr/local and make install ---> install things under /usr/local whereas make DESTDIR=/home/vivek install --> install things under /home/vivek/usr/local -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
