summaryrefslogtreecommitdiff
path: root/indra/cmake/FMOD.cmake
blob: 4582017bcbe7026f8bf4abef551210cb02f87290 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- cmake -*-
include(Prebuilt)

set(FMOD_FIND_QUIETLY OFF)
set(FMOD_FIND_REQUIRED OFF)

if (STANDALONE)
  include(FindFMOD)
else (STANDALONE)
  use_prebuilt_binary(fmod)
  
  if (WINDOWS)
    set(FMOD_LIBRARY fmod)
  elseif (DARWIN)
    set(FMOD_LIBRARY fmod)
  elseif (LINUX)
    set(FMOD_LIBRARY fmod-3.75)
  endif (WINDOWS)
  SET(FMOD_LIBRARIES ${FMOD_LIBRARY})
  
  set(FMOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
endif (STANDALONE)

if (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
  set(FMOD ON CACHE BOOL "Use FMOD sound library.")
else (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
  set(FMOD_LIBRARY "")
  set(FMOD_INCLUDE_DIR "")
  if (FMOD)
    message(STATUS "No support for FMOD audio found.")
  endif (FMOD)
  set(FMOD OFF CACHE BOOL "FMOD sound library not used.")
endif (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)

if (FMOD)
  message(STATUS "Building with FMOD audio support")
endif (FMOD)