[CMake] Query about FindXXX files

Leo Breebaart leo at lspace.org
Wed Sep 17 10:35:08 EDT 2008


In CMake 2.6.1, the header for FindTIFF.cmake says:

# This module defines
#  TIFF_INCLUDE_DIR, where to find tiff.h, etc.
#  TIFF_LIBRARIES, libraries to link against to use TIFF.
#  TIFF_FOUND, If false, do not try to use TIFF.
# also defined, but not for general use are
#  TIFF_LIBRARY, where to find the TIFF library.

However, after executing:

  FIND_PACKAGE(TIFF)

my CMakeCache.txt now has the following entries:

    TIFF_INCLUDE_DIR:PATH=/usr/include
    TIFF_LIBRARY:FILEPATH=/usr/lib/libtiff.so

So, in other words, the "not for general use" TIFF_LIBRARY
variable is placed in my cache, while the promised TIFF_LIBRARIES
variable is not.

Something similar seems to be happening for FindJPEG, FindMPEG,
FindPNG, etc.

So I am probably just missing something here. Can somebody
perhaps explain to me what the reasoning behind the
LIBRARY/LIBRARIES approach is?

Many thanks in advance,

-- 
Leo Breebaart  <leo at lspace.org>



More information about the CMake mailing list