FindSDL_mixer.cmake 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Locate SDL_mixer library
  2. # This module defines
  3. # SDLMIXER_LIBRARY, the name of the library to link against
  4. # SDLMIXER_FOUND, if false, do not try to link to SDL
  5. # SDLMIXER_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 Eric Wing. This was influenced by the FindSDL.cmake
  12. # module, but with modifications to recognize OS X frameworks and
  13. # additional Unix paths (FreeBSD, etc).
  14. #=============================================================================
  15. # Copyright 2005-2009 Kitware, Inc.
  16. #
  17. # Distributed under the OSI-approved BSD License (the "License");
  18. # see accompanying file Copyright.txt for details.
  19. #
  20. # This software is distributed WITHOUT ANY WARRANTY; without even the
  21. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  22. # See the License for more information.
  23. #=============================================================================
  24. # (To distribute this file outside of CMake, substitute the full
  25. # License text for the above reference.)
  26. find_path(SDLMIXER_INCLUDE_DIR SDL_mixer.h
  27. HINTS
  28. ENV SDLMIXERDIR
  29. ENV SDLDIR
  30. PATH_SUFFIXES include include/SDL
  31. PATHS
  32. ~/Library/Frameworks
  33. /Library/Frameworks
  34. /usr/local/include/SDL12
  35. /usr/local/include/SDL11 # FreeBSD ports
  36. /usr/include/SDL12
  37. /usr/include/SDL11
  38. /sw # Fink
  39. /opt/local # DarwinPorts
  40. /opt/csw # Blastwave
  41. /opt
  42. )
  43. find_library(SDLMIXER_LIBRARY
  44. NAMES SDL_mixer
  45. HINTS
  46. ENV SDLMIXERDIR
  47. ENV SDLDIR
  48. PATH_SUFFIXES lib
  49. PATHS
  50. ~/Library/Frameworks
  51. /Library/Frameworks
  52. /sw
  53. /opt/local
  54. /opt/csw
  55. /opt
  56. )
  57. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  58. FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDLMIXER
  59. REQUIRED_VARS SDLMIXER_LIBRARY SDLMIXER_INCLUDE_DIR)