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

Brad King brad.king at kitware.com
Thu Oct 26 11:42:12 EDT 2006


Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA wrote:
> 	On Windows side, I built a zlib library and created
> a zlibConfig.cmake to go with it. The zlibConfig.cmake
> contains the zlib_DEFINITIONS, zlib_LIBRARIES, zlib_INCLUDE_DIRS
> so I don't have to worry 
> Now, in another project that uses zlib, FIND_PACKAGE(zlib)
> uses Findzlib.cmake that comes with CMake. How can
> I force it to use my zlibConfig.cmake instead?

There is no way to do this in cmake 2.4.3.  I've just committed some
changes to cvs cmake to allow you to write

FIND_PACKAGE(zlib NO_MODULE)

to skip the check for the find module and force the zlib_DIR-style lookup.

-Brad


More information about the CMake mailing list