[CMake] Where is a good place to install CMake scripts that are to be executed by cmake -P ?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Aug 22 01:18:14 EDT 2013


On 2013-08-21 22:41+0200 Alexander Neundorf wrote:

> On Tuesday 06 August 2013, Alan W. Irwin wrote:
>> I have a project that installs a CMake script which will be executed
>> by users using cmake -P <fullpath_for_cmake_scriptname>.
>>
>> Where is a reasonable place to install <cmake_scriptname>?  Currently I
>> am thinking of
>>
>> <prefix>/share/<project_name>/<cmake_scriptname>
>
>
> what kind of files are these ?
> Should they be executed manually by users or from their buildsystems, after
> some package has been found ?

Hi Alex:

This cmake script file is executed using cmake -P from an installed
shell script to work around some path mangling issues that occur for a
pure shell script environment for MinGW.  So it is the cmake scripting
ability that is being used here rather than anything specific to do
with a build system.  So it a fairly unique use case, but nevertheless
I would like the installation location for that cmake script file to
be consistent with standards (if there are any such for cmake
scripts).  For now I am sticking with
<prefix>/share/<project_name>/<cmake_scriptname> for that install
location, but I am willing to change if there is a more standard install
location for cmake scripts.

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); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); 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