Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Modules / FindDevIL.cmake
blob65ba9dea7d387e597d481b76eecbca0ba517951f
1 # This module locates the developer's image library.
2 # http://openil.sourceforge.net/
4 # This module sets:
5 # IL_LIBRARIES the name of the IL library. These include the full path to the core DevIL library. This one has to be linked into the application.
6 # ILU_LIBRARIES the name of the ILU library. Again, the full path. This library is for filters and effects, not actual loading. It doesn't have to be linked if the functionality it provides is not used.
7 # ILUT_LIBRARIES the name of the ILUT library. Full path. This part of the library interfaces with OpenGL. It is not strictly needed in applications.
8 # IL_INCLUDE_DIR where to find the il.h, ilu.h and ilut.h files.
9 # IL_FOUND this is set to TRUE if all the above variables were set. This will be set to false if ILU or ILUT are not found, even if they are not needed. In most systems, if one library is found all the others are as well. That's the way the DevIL developers release it.
11 # Original file by: Christopher Harvey
12 # TODO: Add version support.
13 # Tested under Linux and Windows (MSVC)
15 INCLUDE(FindPackageHandleStandardArgs)
17 FIND_PATH(IL_INCLUDE_DIR il.h 
18   PATH_SUFFIXES include IL
19   DOC "The path the the directory that contains il.h"
22 #MESSAGE("IL_INCLUDE_DIR is ${IL_INCLUDE_DIR}")
24 FIND_LIBRARY(IL_LIBRARIES
25   NAMES IL
26   PATH_SUFFIXES lib64 lib lib32
27   DOC "The file that corresponds to the base il library."
30 #MESSAGE("IL_LIBRARIES is ${IL_LIBRARIES}")
32 FIND_LIBRARY(ILUT_LIBRARIES
33   NAMES ILUT
34   PATH_SUFFIXES lib64 lib lib32
35   DOC "The file that corresponds to the il (system?) utility library."
38 #MESSAGE("ILUT_LIBRARIES is ${ILUT_LIBRARIES}")
40 FIND_LIBRARY(ILU_LIBRARIES
41   NAMES ILU
42   PATH_SUFFIXES lib64 lib lib32
43   DOC "The file that corresponds to the il utility library."
46 #MESSAGE("ILU_LIBRARIES is ${ILU_LIBRARIES}")
48 FIND_PACKAGE_HANDLE_STANDARD_ARGS(IL DEFAULT_MSG 
49                                   IL_LIBRARIES ILU_LIBRARIES 
50                                   ILUT_LIBRARIES IL_INCLUDE_DIR)