PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/indra/cmake/FindFMOD.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 44 lines | 27 code | 7 blank | 10 comment | 0 complexity | 965272d75fafa7b00b77513e282fd436 MD5 | raw file
 1# -*- cmake -*-
 2
 3# - Find FMOD
 4# Find the FMOD includes and library
 5# This module defines
 6#  FMOD_INCLUDE_DIR, where to find fmod.h and fmod_errors.h
 7#  FMOD_LIBRARIES, the libraries needed to use FMOD.
 8#  FMOD, If false, do not try to use FMOD.
 9# also defined, but not for general use are
10#  FMOD_LIBRARY, where to find the FMOD library.
11
12FIND_PATH(FMOD_INCLUDE_DIR fmod.h PATH_SUFFIXES fmod)
13
14SET(FMOD_NAMES ${FMOD_NAMES} fmod fmodvc fmodex fmod-3.75)
15FIND_LIBRARY(FMOD_LIBRARY
16  NAMES ${FMOD_NAMES}
17  PATH_SUFFIXES fmod
18  )
19
20IF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
21  SET(FMOD_LIBRARIES ${FMOD_LIBRARY})
22  SET(FMOD_FOUND "YES")
23ELSE (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
24  SET(FMOD_FOUND "NO")
25ENDIF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
26
27IF (FMOD_FOUND)
28  IF (NOT FMOD_FIND_QUIETLY)
29    MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARIES}")
30  ENDIF (NOT FMOD_FIND_QUIETLY)
31ELSE (FMOD_FOUND)
32  IF (FMOD_FIND_REQUIRED)
33    MESSAGE(FATAL_ERROR "Could not find FMOD library")
34  ENDIF (FMOD_FIND_REQUIRED)
35ENDIF (FMOD_FOUND)
36
37# Deprecated declarations.
38SET (NATIVE_FMOD_INCLUDE_PATH ${FMOD_INCLUDE_DIR} )
39GET_FILENAME_COMPONENT (NATIVE_FMOD_LIB_PATH ${FMOD_LIBRARY} PATH)
40
41MARK_AS_ADVANCED(
42  FMOD_LIBRARY
43  FMOD_INCLUDE_DIR
44  )