*NIX installation configuration (was [CMake] Cmake and Win32 plugin linking issues.)

Andreas 'GlaDiaC' Schneider mail at cynapses.org
Thu Aug 24 02:57:00 EDT 2006


Alan W. Irwin wrote:
>> Am I correct in understanding that *NIX packagers will need to patch my
>> upstream CMakeLists.txt to adjust install location to fit with their
>> distribution policies ?
>
> No.  You can set things up to give users the complete freedom to determine
> path variables.  To give this discussion some perspective, here is what is
> typically available from autotools (taken from ./configure --help):
>
> Fine tuning of the installation directories:
>    --bindir=DIR           user executables [EPREFIX/bin]
>    --sbindir=DIR          system admin executables [EPREFIX/sbin]
>    --libexecdir=DIR       program executables [EPREFIX/libexec]
>    --datadir=DIR          read-only architecture-independent data
> [PREFIX/share]
>    --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
>    --sharedstatedir=DIR   modifiable architecture-independent data
> [PREFIX/com]
>    --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
>    --libdir=DIR           object code libraries [EPREFIX/lib]
>    --includedir=DIR       C header files [PREFIX/include]
>    --oldincludedir=DIR    C header files for non-gcc [/usr/include]
>    --infodir=DIR          info documentation [PREFIX/info]
>    --mandir=DIR           man documentation [PREFIX/man]
>
> It's possible to set all these paths up with CMake, but that is probably
> overkill, and you will probably only want to remind your users to use
> CMAKE_INSTALL_PREFIX rather than PREFIX, and set up a small subset of the
> above based on that prefix.  For example,
>
> set(infodir
> ${CMAKE_INSTALL_PREFIX}/share/info
> CACHE
> PATH
> "install location for info files"
> )

I've written an Install cmake file which defines all the needed dirs. It
needs more work to set the PATHES for more operating systems. Windows,
Linux and Mac.

In your main CMakeLists.txt set the projectname

SET(PROJECTNAME "wengophone")

 -- andreas

>
> gives a good (LFHS rather than autotools) default install location for
> info
> files which the user has the option to override using ccmake or
> -Dinfodir=/path/to/info/files, and which you consistently use as the
> DESTINATION when you install info files using CMake. You could similarly
> set
> up any of the other autotools install paths mentioned above using CMake.
>
> 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 Yorick front-end to PLplot (yplot.sf.net); the
> Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
> (lbproject.sf.net).
> __________________________
>
> Linux-powered Science
> __________________________
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WengoInstall.cmake
Type: application/octet-stream
Size: 3109 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060824/1fb9f6f0/WengoInstall.obj


More information about the CMake mailing list