[CMake] FindZLIB does not function on Windows systems

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat Oct 7 21:26:20 EDT 2006


On 2006-10-07 23:04+0200 Matthieu Brucher wrote:

> Hi,
>
> I used to make by Makefiles with autotools for Linux, but as my programs
> must support Windows and Linux, and that some of them use Qt4, I decided to
> try CMake.
> When I tried FIND_PACKAGE(ZLIB) on my system, Zlib couldn't be found, so I
> checked in the .cmake file. The include and library files are searched only
> in /usr/xx or /usr/local/xx, paths that cannot be used on Windows.
> Is it possible to add CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH in the
> FindZLIB.cmake on the repository so that it can work on Windows too ?

FindZLIB.cmake uses FIND_PATH and FIND_LIBRARY which should automatically
honor CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH already according to the
documentation of those commands at
http://www.cmake.org/HTML/Documentation.html.  See also
http://www.cmake.org/Wiki/CMake_Useful_Variables.  So FIND_PACKAGE(ZLIB)
should just work without any further change if you have those environment
variables set properly.

Alan
__________________________
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
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list