[CMake] Permissions for new folders and files

Hendrik Sattler post at hendrik-sattler.de
Fri Aug 8 04:18:08 EDT 2008


Zitat von Брюков Юрий <y.brukov at gmail.com>:

> Thanks Yuri and Alan.
>   But I develop cross-platform application (for Linux and Windows now)
> and it would be better if directory layout for my application will be
> the same on both platform.

Actually better is a layout that can be adopted to the specific platform.
DLL and .so files are in totally different locations relative to the  
application binary.

> Or in this case I also should try to follow the FHS for Linux platform?

That's non-sense.

>   By the way, my application consists of some shared libraries and
> executables files. And shared libraries should be placed in some
> directory from the PATH.

Not on Linux, neither /lib/ nor /usr/lib are in PATH. And it is not  
strictly necessary to put libraries there. Sometime, rpath is actually  
useful, you know!

> I suggest it require root privileges in
> Linux. In result, `make install` command should be executed with root
> access. If there any way to avoid this issue? Because in this case I
> have the troubles described above.

"man ld.so" is your friend, look for LD_LIBRARY_PATH if you don't want  
to use rpath with $ORIGIN.

HS




More information about the CMake mailing list