FindFMOD.cmake 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #.rst:
  2. # FindFMOD
  3. # ------------
  4. #
  5. # Locate FMOD Ex library
  6. #
  7. # This module defines
  8. #
  9. # ::
  10. #
  11. # FMOD_LIBRARIES, the library to link against
  12. # FMOD_FOUND, if false, do not try to link to fmodex
  13. # FMOD_INCLUDE_DIRS, where to find headers.
  14. #
  15. find_path(FMOD_INCLUDE_DIR fmod.hpp
  16. HINTS ENV FMOD_DIR
  17. PATH_SUFFIXES include/fmod include
  18. PATHS
  19. ~/Library/Frameworks
  20. /Library/Frameworks
  21. /usr/local
  22. /usr
  23. /sw # Fink
  24. /opt/local # DarwinPorts
  25. /opt/csw # Blastwave
  26. /opt
  27. )
  28. find_library(FMOD_LIBRARY NAMES fmod fmod64
  29. HINTS ENV FMOD_DIR
  30. PATH_SUFFIXES lib
  31. PATHS
  32. ~/Library/Frameworks
  33. /Library/Frameworks
  34. /usr/local
  35. /usr
  36. /sw # Fink
  37. /opt/local # DarwinPorts
  38. /opt/csw # Blastwave
  39. /opt
  40. )
  41. set(FMOD_INCLUDE_DIRS "${FMOD_INCLUDE_DIR}")
  42. set(FMOD_LIBRARIES "${FMOD_LIBRARY}")
  43. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  44. find_package_handle_standard_args(FMOD DEFAULT_MSG FMOD_LIBRARIES FMOD_INCLUDE_DIRS)
  45. mark_as_advanced(FMOD_INCLUDE_DIR FMOD_LIBRARY FMOD_INCLUDE_DIRS FMOD_LIBRARIES)