[CMake] lib/cmake vs share/cmake/Modules

Alexander Neundorf a.neundorf-work at gmx.net
Mon Feb 9 15:34:11 EST 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).

Alex




More information about the CMake mailing list