[cmake-developers] FindDevIL.cmake module looks for wrong header
Brad King
brad.king at kitware.com
Wed Aug 3 16:17:47 EDT 2011
On 8/2/2011 4:41 PM, Miłosz Kosobucki wrote:
> FindDevIL.cmake module seems to be looking for il.h header instead of
> IL/il.h. This way, user should be writing
>
> #include<il.h>
>
> instead of
>
> #include<IL/il.h>
>
> in his code. Note that the latter version is used with all examples in
> DevIL library. Also libraries like OpenGL use the latter format.
>
> I hope I included the patch properly. It was tested on Windows (MSVC
> 2010) and Linux.
Unfortunately this is a backward-incompatible change. If a CMake-based
project does
find_package(DevIL)
include_directories(${IL_INCLUDE_DIR})
and in its C code has
#include <il.h>
then it would work prior to this patch and not afterward. In order to
make this change in a compatible way you will need to use a different
variable name.
The module also needs to be fixed to follow conventions documented in
the module readme (note the difference between singular and plural names):
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/readme.txt;hb=v2.8.5
Perhaps you can name all the variables with a "DevIL_" prefix and the
proper behavior you propose above. Then provide compatible values in
the old names.
BTW, currently the FindDevIL module has no module maintainer:
http://www.cmake.org/Wiki/CMake:Module_Maintainers
to review patches and maintain the module. If you're interested in
becoming the maintainer for this module, let me know.
-Brad
More information about the cmake-developers
mailing list