summaryrefslogtreecommitdiff
path: root/indra/cmake/OPENAL.cmake
blob: 9904f6d1c00d687e53559015f8dc47e0bf4ec3c9 (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
# -*- cmake -*-
include(Linking)
include(Prebuilt)

include_guard()

if (LINUX)
  set(OPENAL ON CACHE BOOL "Enable OpenAL")
else (LINUX)
  set(OPENAL OFF CACHE BOOL "Enable OpenAL")
endif (LINUX)

if (OPENAL)
  create_target( ll::openal )
  set_target_include_dirs( ll::openal "${LIBS_PREBUILT_DIR}/include/AL")

  use_prebuilt_binary(openal)

  if(WINDOWS)
    set_target_libraries( ll::openal
            OpenAL32
            alut
            )
  elseif(LINUX)
    set_target_libraries( ll::openal
            openal
            alut
            )
  else()
    message(FATAL_ERROR "OpenAL is not available for this platform")
  endif()
endif (OPENAL)