[CMake] Permissions for new folders and files
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Fri Aug 8 10:10:11 EDT 2008
On 2008-08-08 10:54+0300 âÒÀËÏ× àÒÉÊ wrote:
> 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. Or in this case I also should try to follow
> the FHS for Linux platform?
My advice is to follow the FHS on Linux since that is a pretty strong
standard that everybody follows on that platform (subject to changing the
installation prefix). I don't have any Windows experience, but I have heard
the install standards are much looser there. So you might be able to follow
the FHS in that case as well (again subject to changing the installation
prefix).
> 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.
Executables should be on the PATH on Linux, not libraries.
> I suggest it require root privileges in
> Linux.
Not necessarily. Suppose for example I install with the the installation
prefix /home/software/plplot/install (which is a directory in a user account
on my system) rather than using either /usr or /usr/local. Then the
libraries will be installed into /home/software/plplot/nstall/lib and the
executables installed into /home/software/plplot/install/bin (just like the
FHS says). Then I add /home/software/plplot/install/bin to the first part
of my PATH, and everything works as it should. (You may also have to
set LD_LIBRARY_PATH for the shared libraries if you haven't used the rpath
option when you link your executables.)
The point is if you install to a set pattern such as the FHS with a
non-standard install user account prefix, then it is easy to adjust your
PATH (and possibly LD_LIBRARY_PATH) to take account of that installation
prefix, and you can install then just using an ordinary user account which
owns the installation prefix directory.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the CMake
mailing list