[cmake-developers] inappropriate use of PATH_SUFFIXES in FindALSA?

Brad King brad.king at kitware.com
Thu Feb 9 08:57:55 EST 2012


On 2/9/2012 3:17 AM, Andriy Gapon wrote:
> First a snippet taken from FindALSA.cmake from cmake-2.8.7:
> find_path(ALSA_INCLUDE_DIR NAMES asoundlib.h
>            PATH_SUFFIXES alsa
>            DOC "The ALSA (asound) include directory"
> )

It looks like that was added in the original version:

   http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=450c30b5

so it was not a fix for something AFAIK.

> To summarize, if the C code actually includes alsa/asoundlib.h, then wouldn't it
> be appropriate to use exactly the same path, alsa/asoundlib.h, with find_path
> like this:
> find_path(ALSA_INCLUDE_DIR NAMES alsa/asoundlib.h
>            DOC "The ALSA (asound) include directory"
> )

I think so.  Philip?

-Brad


More information about the cmake-developers mailing list