FindJack.cmake 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # - Find JACK library
  2. # Find the native JACK includes and library
  3. # This module defines
  4. # JACK_INCLUDE_DIRS, where to find jack.h, Set when
  5. # JACK_INCLUDE_DIR is found.
  6. # JACK_LIBRARIES, libraries to link against to use JACK.
  7. # JACK_ROOT_DIR, The base directory to search for JACK.
  8. # This can also be an environment variable.
  9. # JACK_FOUND, If false, do not try to use JACK.
  10. #
  11. # also defined, but not for general use are
  12. # JACK_LIBRARY, where to find the JACK library.
  13. #=============================================================================
  14. # Copyright 2011 Blender Foundation.
  15. #
  16. # Distributed under the OSI-approved BSD License (the "License");
  17. # see accompanying file Copyright.txt for details.
  18. #
  19. # This software is distributed WITHOUT ANY WARRANTY; without even the
  20. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  21. # See the License for more information.
  22. #=============================================================================
  23. # If JACK_ROOT_DIR was defined in the environment, use it.
  24. IF(NOT JACK_ROOT_DIR AND NOT $ENV{JACK_ROOT_DIR} STREQUAL "")
  25. SET(JACK_ROOT_DIR $ENV{JACK_ROOT_DIR})
  26. ENDIF()
  27. SET(_jack_SEARCH_DIRS
  28. ${JACK_ROOT_DIR}
  29. /usr/local
  30. /sw # Fink
  31. /opt/local # DarwinPorts
  32. /opt/csw # Blastwave
  33. )
  34. FIND_PATH(JACK_INCLUDE_DIR
  35. NAMES
  36. jack.h
  37. HINTS
  38. ${_jack_SEARCH_DIRS}
  39. PATH_SUFFIXES
  40. include/jack
  41. )
  42. FIND_LIBRARY(JACK_LIBRARY
  43. NAMES
  44. jack
  45. HINTS
  46. ${_jack_SEARCH_DIRS}
  47. PATH_SUFFIXES
  48. lib64 lib
  49. )
  50. # handle the QUIETLY and REQUIRED arguments and set JACK_FOUND to TRUE if
  51. # all listed variables are TRUE
  52. INCLUDE(FindPackageHandleStandardArgs)
  53. FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jack DEFAULT_MSG
  54. JACK_LIBRARY JACK_INCLUDE_DIR)
  55. IF(JACK_FOUND)
  56. SET(JACK_LIBRARIES ${JACK_LIBRARY})
  57. SET(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
  58. ENDIF(JACK_FOUND)
  59. MARK_AS_ADVANCED(
  60. JACK_INCLUDE_DIR
  61. JACK_LIBRARY
  62. )