FindSDL_mixer.cmake 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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
  31. PATHS
  32. ~/Library/Frameworks
  33. /Library/Frameworks
  34. /usr/local/include/SDL
  35. /usr/include/SDL
  36. /usr/local/include/SDL12
  37. /usr/local/include/SDL11 # FreeBSD ports
  38. /usr/include/SDL12
  39. /usr/include/SDL11
  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(SDLMIXER_LIBRARY
  50. NAMES SDL_mixer
  51. HINTS
  52. $ENV{SDLMIXERDIR}
  53. $ENV{SDLDIR}
  54. PATH_SUFFIXES lib64 lib
  55. PATHS
  56. ~/Library/Frameworks
  57. /Library/Frameworks
  58. /sw
  59. /opt/local
  60. /opt/csw
  61. /opt
  62. )
  63. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  64. FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDLMIXER
  65. REQUIRED_VARS SDLMIXER_LIBRARY SDLMIXER_INCLUDE_DIR)