FindSDL_gfx.cmake 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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_LIBRARY(SDLGFX_LIBRARY
  50. NAMES SDL_gfx
  51. HINTS
  52. $ENV{SDLGFXDIR}
  53. $ENV{SDLDIR}
  54. PATH_SUFFIXES lib64 lib
  55. PATHS
  56. ~/Library/Frameworks
  57. /Library/Frameworks
  58. /usr/local
  59. /usr
  60. /sw
  61. /opt/local
  62. /opt/csw
  63. /opt
  64. )
  65. SET(SDLGFX_FOUND "NO")
  66. IF(SDLGFX_LIBRARY AND SDLGFX_INCLUDE_DIR)
  67. SET(SDLGFX_FOUND "YES")
  68. ENDIF(SDLGFX_LIBRARY AND SDLGFX_INCLUDE_DIR)