[CMake] FindXXX.cmake specification inconsistency

r.koebler at yahoo.de r.koebler at yahoo.de
Sun Apr 22 06:32:34 EDT 2007


hi,

> >ok, so XXX_INCLUDE_DIRS and XXX_LIBRARIES should be in the cache, but
> >hidden/INTERNAL. right ?
> 
> No, they are just set with an ordinary (without CACHE option) SET command
> in the vast majority of Find*.cmake module cases.

> So it appears in at least these cases that (except for
> those two instances) the directions in readme.txt are being followed.
ok, but these packages put XXX_INCLUDE_DIR and XXX_LIBRARY into the
cache, which I think is even more confusing. (and they often put
even more (lower-level) variables into the cache [1].)

in detail: many of these packages
- set XXX_INCLUDE_DIR, and put it into the cache (via FIND_PATH)
- set XXX_INCLUDE_DIRS to XXX_INCLUDE_DIR (if the library was found),
                       and don't put it into the cache.
- set XXX_LIBRARY,     and put it into the cache (via FIND_LIBRARY)
- set XXX_LIBRARIES    to XXX_LIBRARY     (if the library was found),
                       and don't put it into the cache.

so, we've got 2 include-variables (XXX_INCLUDE_DIR and XXX_INCLUDE_DIRS),
containing the same, one in the cache and the other not.
It's the the same for XXX_LIBRARY and XXX_LIBRARIES.

so, why use 2 variables, when 1 is enough???


regards,
Roland



[1] i.e. FindGTK.cmake adds:
GTK_gtk_INCLUDE_PATH
GTK_gtkgl_INCLUDE_PATH
GTK_glib_INCLUDE_PATH
GTK_glibconfig_INCLUDE_PATH
GTK_gdk_LIBRARY
GTK_glib_LIBRARY
GTK_gmodule_LIBRARY
GTK_gthread_LIBRARY
GTK_Xi_LIBRARY
GTK_gtk_LIBRARY
GTK_gtkgl_LIBRARY



More information about the CMake mailing list