FindDevIL.cmake 2.9 KB

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