FindDevIL.cmake 2.4 KB

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