FindDevIL.cmake 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # This module locates the developer's image library.
  2. # http://openil.sourceforge.net/
  3. #
  4. # This module sets:
  5. # IL_LIBRARIES - the name of the IL library. These include the full path to
  6. # the core DevIL library. This one has to be linked into the
  7. # application.
  8. # ILU_LIBRARIES - the name of the ILU library. Again, the full path. This
  9. # library is for filters and effects, not actual loading. It
  10. # doesn't have to be linked if the functionality it provides
  11. # is not used.
  12. # ILUT_LIBRARIES - the name of the ILUT library. Full path. This part of the
  13. # library interfaces with OpenGL. It is not strictly needed
  14. # in applications.
  15. # IL_INCLUDE_DIR - where to find the il.h, ilu.h and ilut.h files.
  16. # IL_FOUND - this is set to TRUE if all the above variables were set.
  17. # This will be set to false if ILU or ILUT are not found,
  18. # even if they are not needed. In most systems, if one
  19. # library is found all the others are as well. That's the
  20. # way the DevIL developers release it.
  21. #=============================================================================
  22. # Copyright 2008-2009 Kitware, Inc.
  23. # Copyright 2008 Christopher Harvey
  24. #
  25. # Distributed under the OSI-approved BSD License (the "License");
  26. # see accompanying file Copyright.txt for details.
  27. #
  28. # This software is distributed WITHOUT ANY WARRANTY; without even the
  29. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  30. # See the License for more information.
  31. #=============================================================================
  32. # (To distribute this file outside of CMake, substitute the full
  33. # License text for the above reference.)
  34. # TODO: Add version support.
  35. # Tested under Linux and Windows (MSVC)
  36. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  37. find_path(IL_INCLUDE_DIR il.h
  38. PATH_SUFFIXES include IL
  39. DOC "The path the the directory that contains il.h"
  40. )
  41. #message("IL_INCLUDE_DIR is ${IL_INCLUDE_DIR}")
  42. find_library(IL_LIBRARIES
  43. NAMES IL DEVIL
  44. PATH_SUFFIXES lib64 lib lib32
  45. DOC "The file that corresponds to the base il library."
  46. )
  47. #message("IL_LIBRARIES is ${IL_LIBRARIES}")
  48. find_library(ILUT_LIBRARIES
  49. NAMES ILUT
  50. PATH_SUFFIXES lib64 lib lib32
  51. DOC "The file that corresponds to the il (system?) utility library."
  52. )
  53. #message("ILUT_LIBRARIES is ${ILUT_LIBRARIES}")
  54. find_library(ILU_LIBRARIES
  55. NAMES ILU
  56. PATH_SUFFIXES lib64 lib lib32
  57. DOC "The file that corresponds to the il utility library."
  58. )
  59. #message("ILU_LIBRARIES is ${ILU_LIBRARIES}")
  60. FIND_PACKAGE_HANDLE_STANDARD_ARGS(IL DEFAULT_MSG
  61. IL_LIBRARIES ILU_LIBRARIES
  62. ILUT_LIBRARIES IL_INCLUDE_DIR)