[CMake] include command
Michael Wild
themiwi at gmail.com
Tue Oct 26 03:26:58 EDT 2010
On 26. Oct, 2010, at 1:02 , sipxuser sipx wrote:
> Dear all,
>
> I'm a newbie of cmake, and have some troubles in using the 'include'
> command. I've already include the searching path into the env veriable PATH.
> But each time running cmake, I always get follow error messages:
>
> CMake Error at CMakeLists.txt: xxx (include):
> include could not find load file:
> xxx_module
>
> Can anynone give some advices? Thanks in advance.
>
> Michael.
Well, the include command literally tries to include a file into your CMakeLists.txt file. There are two modes:
INCLUDE(path/to/file.cmake)
This mode just includes the file named path/to/file.cmake. If the path is not absolute, AFAIK it is relative to the directory containing the current file being processed.
INCLUDE(modulename)
In this mode, where modulename is just a single name with no path component and no extension, searches for the file modulename.cmake in the directories listed in the variable CMAKE_MODULE_PATH.
I hope this helps, otherwise you'll have to provide more information (e.g. what is it that you're trying to achieve, show the relevant code, etc.)
Michael
--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101026/e5585b58/attachment.pgp>
More information about the CMake
mailing list