how to modify the install-path without running the configure script/cmake again

前端 未结 5 1993
情歌与酒
情歌与酒 2021-01-30 16:55

I am working on a project which takes considerable time to build (10-15) minutes. I have recompiled to verify if there is a compilation error. Now I want to change the install d

5条回答
  •  甜味超标
    2021-01-30 17:38

    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[...]

提交回复
热议问题