[CMake] lib/cmake vs share/cmake/Modules
Alexander Neundorf
a.neundorf-work at gmx.net
Tue Feb 10 16:19:20 EST 2015
On Tuesday, February 10, 2015 03:43:33 44ghnqv8rg at snkmail.com wrote:
> Alexander Neundorf wrote at 21:34 +0100 on Feb 9, 2015:
> > On Monday, February 09, 2015 18:23:41 44ghnqv8rg at snkmail.com wrote:
> > > How does one who is making a package which installs .cmake files
> > > decide whether to put them in .../share/cmake/Modules or
> > > .../lib/cmake? Where are the docs about that? I've seen
> > > examples of 3rd party packages doing both (e.g., pulseaudio in
> > > lib/cmake/Foo & opencollada - in share/cmake/Modules).
> >
> > architecture-independent files, i.e. which could sit on a shared
> > NFS drive and which could be mounted from hosts with any type of
> > CPU architecture, go into share/, i.e. basically data or text
> > files. Files which are architecture dependend, e.g. Config.cmake
> > files for installed libraries, go into lib/. (in doubt, lib/ is
> > the safe choice).
>
> I'm looking for official cmake docs that explain the difference
> between the two locations from cmake's perspective (rather than
> just guidelines reiterated from hier(7)).
I'm not aware for any more official docs, and if there are some, I doubt that
they would contradict hier(7).
So, Config.cmake files for libraries into lib/, for packages which are e.g.
header only or similar share/ it is.
If there are Config.cmake files for libraries which ar in shared I would
consider this a bug.
Alex
More information about the CMake
mailing list