[CMake] Telling CMake to use zlibConfig.cmake instead of the Findzlib.cmake

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Oct 27 13:05:35 EDT 2006

On 2006-10-27 08:50-0700 Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA wrote:

>    This is my understanding. Everybody, please correct me if I am wrong.
>    There are two types of modules: <name>Config.cmake. and Find<name>.cmake
>    A package (eg. library) provides <name>Config.cmake. The
> <name>Config.cmake
> advertises package's locations (where were its headers and libraries
> installed), version, definitions
> (whether  to do -D<name>_DLL on Windows), and anything else related to the
> usage of this package.
> It is similar to what <name>.pc is to pkg-config. The '<name>' in this case
> is the package's
> own name.

I would correct the above statement to FIND_PACKAGE(name) can access two
module types, namely Find<name>.cmake modules and <name>Config.cmake

The reason why I think you should mention FIND_PACKAGE in your summary of
the situation is INCLUDE (using INCLUDE(Find<name>) and
INCLUDE(<name>Config)) can also access those two kinds of modules (with all
special rules dropped, i.e, the modules are treated like general modules)
and also general modules (called <name>.cmake and accessed with
INCLUDE(<name>)) that unlike the Find<name>.cmake and <name>Config.cmake
forms have no special rules associated with them.

Artur, I also must say my participation in this discussion clearly
illustrates that I know little about the <name>Config.cmake kind of module.
:-) So thanks very much for your patience with me.  However, I think my
participation will have been worthwhile if the result is that somebody
properly documents that kind of module.

A module that gives header and library information for a package does sound
most useful, and, in fact, we could use that kind of module for the PLplot
project (especially if the module is automatically generated from the
install information that CMake already has access to) so I am looking
forward to when that kind of module is properly documented.

I was also most interested in the link
http://www.cmake.org/Bug/bug.php?op=show&bugid=3659 provided by Brad Kind
concerning future plans for substantial FIND_PACKAGE changes.

Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project

Linux-powered Science

More information about the CMake mailing list