[CMake] Trying to setup make folder configuration on linux

Eric Noulard eric.noulard at gmail.com
Sat Dec 11 17:13:48 EST 2010


2010/12/11 Louis Hoefler <louis.hoefler at gmx.de>:
> Indeed, it works with
> INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/massmailer DESTINATION bin)

This is not the appropriate way to install a target build with cmake
(even if it works).
Like Tyler said you should be doing something wrong in your CMakeLists.txt.

>
> PS.: This is only a development computer, you do not want to know how ofter
> I accidently entered rm -f somewhere, and since I want to install into the
> global bin path, I need root access.

On Linux (and may be on other platforms too) you'd better be building
a package (DEB, RPM)
using CPack as "normal user" and
install the generated package as root.

This will even be easier to remove your installation without messing
up with "rm -rf".
The package manager (rpm, dpkg) may safely uninstall the package you
did install before.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list