[CMake] Install path for package files

Alexander Lamaison awl03 at doc.ic.ac.uk
Fri Oct 3 06:22:57 EDT 2014


Noah Roberts <roberts.noah at gmail.com>
writes:

snip

> I gather I need to create a BlahModule.cmake file that implements the
> package finding stuff.  I want to install this wherever cmake will find
> it.  I don't want to put it in some place in the system and then expect
> dependent CMakeLists.txt files to set that path when using
> find_package.

snip

> So what is the variable I use in the install() function for the DESTINATION
> parameter to do this?  I assume there must be one...  I can't seem to find
> it in the documentation though.

Me neither.  This answer [1] lists the places that CMake looks for the
BlahConfig.cmake file so on Unix it's fairly simple.  Set the
DESTINATION to 'lib' which will install it to
/usr/local/lib/BlahConfig.cmake where, presumable, find_package will
locate it.  I don't understand how this is meant to work on Windows,
though.  How is CMake meant to know which root to start thee search
under?

[1] http://stackoverflow.com/a/11965673/67013

Alex

-- 
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)



More information about the CMake mailing list