summaryrefslogtreecommitdiff
path: root/indra/cmake/OPENAL.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/OPENAL.cmake')
-rw-r--r--indra/cmake/OPENAL.cmake34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake
index 1bbfff6f98..9904f6d1c0 100644
--- a/indra/cmake/OPENAL.cmake
+++ b/indra/cmake/OPENAL.cmake
@@ -2,6 +2,8 @@
include(Linking)
include(Prebuilt)
+include_guard()
+
if (LINUX)
set(OPENAL ON CACHE BOOL "Enable OpenAL")
else (LINUX)
@@ -9,24 +11,22 @@ else (LINUX)
endif (LINUX)
if (OPENAL)
- set(OPENAL_LIB_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/AL")
- if (USESYSTEMLIBS)
- include(FindPkgConfig)
- include(FindOpenAL)
- pkg_check_modules(OPENAL_LIB REQUIRED openal)
- pkg_check_modules(FREEALUT_LIB REQUIRED freealut)
- else (USESYSTEMLIBS)
- use_prebuilt_binary(openal)
- endif (USESYSTEMLIBS)
+ create_target( ll::openal )
+ set_target_include_dirs( ll::openal "${LIBS_PREBUILT_DIR}/include/AL")
+
+ use_prebuilt_binary(openal)
+
if(WINDOWS)
- set(OPENAL_LIBRARIES
- OpenAL32
- alut
- )
+ set_target_libraries( ll::openal
+ OpenAL32
+ alut
+ )
+ elseif(LINUX)
+ set_target_libraries( ll::openal
+ openal
+ alut
+ )
else()
- set(OPENAL_LIBRARIES
- openal
- alut
- )
+ message(FATAL_ERROR "OpenAL is not available for this platform")
endif()
endif (OPENAL)