FindSDL_gfx.cmake 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Locate SDL_gfx library
  2. # This module defines
  3. # SDLGFX_LIBRARY, the name of the library to link against
  4. # SDLGFX_FOUND, if false, do not try to link to SDL
  5. # SDLGFX_INCLUDE_DIR, where to find SDL/SDL.h
  6. #
  7. # $SDLDIR is an environment variable that would
  8. # correspond to the ./configure --prefix=$SDLDIR
  9. # used in building SDL.
  10. #
  11. # Created by David Demelier. This was influenced by the FindSDL_mixer.cmake
  12. #=============================================================================
  13. # Copyright 2005-2009 Kitware, Inc.
  14. #
  15. # Distributed under the OSI-approved BSD License (the "License");
  16. # see accompanying file Copyright.txt for details.
  17. #
  18. # This software is distributed WITHOUT ANY WARRANTY; without even the
  19. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  20. # See the License for more information.
  21. #=============================================================================
  22. # (To distribute this file outside of CMake, substitute the full
  23. # License text for the above reference.)
  24. FIND_PATH(SDLGFX_INCLUDE_DIR SDL_gfxPrimitives.h
  25. HINTS
  26. $ENV{SDLGFXDIR}
  27. $ENV{SDLDIR}
  28. PATH_SUFFIXES include
  29. PATHS
  30. ~/Library/Frameworks
  31. /Library/Frameworks
  32. /usr/local/include/SDL
  33. /usr/include/SDL
  34. /usr/local/include/SDL12
  35. /usr/local/include/SDL11 # FreeBSD ports
  36. /usr/include/SDL12
  37. /usr/include/SDL11
  38. /usr/local/include
  39. /usr/include
  40. /sw/include/SDL # Fink
  41. /sw/include
  42. /opt/local/include/SDL # DarwinPorts
  43. /opt/local/include
  44. /opt/csw/include/SDL # Blastwave
  45. /opt/csw/include
  46. /opt/include/SDL
  47. /opt/include
  48. )
  49. FIND_PATH(SDLGFX_SOURCE_DIR SDL_framerate.c SDL_gfxBlitFunc.c SDL_gfxPrimitives.c SDL_imageFilter.c SDL_rotozoom.c
  50. HINTS
  51. $ENV{SDLGFXDIR}
  52. $ENV{SDLDIR}
  53. PATH_SUFFIXES source
  54. PATHS
  55. ~/Library/Frameworks
  56. /Library/Frameworks
  57. /usr/local/source/SDL
  58. /usr/source/SDL
  59. /usr/local/source/SDL12
  60. /usr/local/source/SDL11 # FreeBSD ports
  61. /usr/source/SDL12
  62. /usr/source/SDL11
  63. /usr/local/source
  64. /usr/source
  65. /sw/source/SDL # Fink
  66. /sw/source
  67. /opt/local/source/SDL # DarwinPorts
  68. /opt/local/source
  69. /opt/csw/source/SDL # Blastwave
  70. /opt/csw/source
  71. /opt/source/SDL
  72. /opt/source
  73. )
  74. SET(SDLGFX_FOUND "NO")
  75. IF(SDLGFX_SOURCE_DIR AND SDLGFX_INCLUDE_DIR)
  76. SET(SDLGFX_FOUND "YES")
  77. ENDIF(SDLGFX_SOURCE_DIR AND SDLGFX_INCLUDE_DIR)