[CMake] Specifying search path for FIND_PACKAGE
Filipe Sousa
filipe at ipb.pt
Fri Nov 11 18:13:25 EST 2005
On Friday 11 November 2005 22:18, Amit Ramesh wrote:
> Hi,
>
> Is there a uniform way to specify the paths that FIND_PACKAGE
> uses to search for installed packages. On Mac OS X, Fink is a popular
By default FIND_PACKAGE will look into Find scripts in cmake Modules
directory. You can add a new search path by setting CMAKE_MODULE_PATH
fsousa at neptuno:~$ cmake --help-command FIND_PACKAGE
cmake version 2.3-20051105
FIND_PACKAGE
Load settings for an external project.
FIND_PACKAGE(<name> [major.minor] [QUIET] [REQUIRED])
Finds and loads settings from an external project. <name>_FOUND will
be set to indicate whether the package was found. Settings that can
be used when <name>_FOUND is true are package-specific. The package
is found through several steps. Directories listed in
CMAKE_MODULE_PATH are searched for files called "Find<name>.cmake".
If such a file is found, it is read and processed by CMake, and is
responsible for finding the package. If no such file is found, it is
expected that the package is another project built by CMake that has a
"<name>Config.cmake" file. A cache entry called <name>_DIR is created
and is expected to be set to the directory containing this file. If
the file is found, it is read and processed by CMake to load the
settings of the package. If <name>_DIR has not been set during a
configure step, the command will generate an error describing the
problem unless the QUIET argument is specified. If <name>_DIR has
been set to a directory not containing a "<name>Config.cmake" file, an
error is always generated. If REQUIRED is specified and the package
is not found, a FATAL_ERROR is generated and the configure step stops
executing.
> mechanism to install unix ports, and they get installed in the /sw by
> default. However, cmake does not seem to include this in its search
> and so does not find an existing package. Is there a good way to
> include this in a package independent manner?
>
--
Filipe Sousa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20051111/7d8d9943/attachment.pgp
More information about the CMake
mailing list