[Cmake] Making the cmake FindXXX.cmake files more consistent

Ian Scott ian.m.scott at stud.man.ac.uk
Fri Aug 16 12:30:45 EDT 2002


We (VXL) have our own Modules directory containing lots of FindXXX.cmake
files. In part this is to deal with the fact that vxl provides buildable
copies of some external libraries (e.g. zlib, jpeg). However, a lot of them
are to provide a consistency which is missing from the default cmake
modules.

Our module files aim to follow the following conventions.
FindFOO.cmake defines HAS_FOO, and FOO_INCLUDE_PATH, FOO_LIBRARY_PATH
It also defines FOO_LIBRARIES containing all the libraries needed to use foo
(e.g. for qt on windows it defines "imm32.lib ws2_32.lib qt.lib") Finally,
it does an ADD_DEFINITIONS( -DHAS_JPEG )

Amitha says:
For example, CMake's FindGLUT provides GLUT_INCLUDE_PATH
and GLUT_LIBRARY; FindGTK _only_ checks for libgtk, but provides
GTK_INCLUDE_PATH, GTK_LIB_PATH, GTK_GLIB_INCLUDE_PATH; FindJPEG
provides NATIVE_JPEG_INCLUDE_PATH and NATIVE_JPEG_LIB_PATH.

We would like to port a lot of this functionality out of vxl into cmake - if
only because wrapping cmake/Modules/FindXXX.cmake with
VXL/config.cmake/Module/FindXXX.cmake is a real hassle. However we feel that
CMake could benefit from this consistency.

Do you think this would be a worth doing for CMake1.6? Are VTK prepared to
deal with all the changes?

Ian.







More information about the CMake mailing list