summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-07-11 10:41:11 +0800
committerErik Kundiman <erik@megapahit.org>2023-07-19 10:43:34 +0800
commitce4362108a90033c5514a1d72230a6e91015f025 (patch)
tree27f49ffcfee5e99d244176b756eb8ac616689915
parent351f8d2162e57751f9a4d0d47655a861ac2b37ad (diff)
OpenAL system lib flags by checking frealut module
-rw-r--r--indra/cmake/OPENAL.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake
index 0b6a7c2853..cc7deac2d9 100644
--- a/indra/cmake/OPENAL.cmake
+++ b/indra/cmake/OPENAL.cmake
@@ -18,6 +18,17 @@ endif()
if (USE_OPENAL)
add_library( ll::openal INTERFACE IMPORTED )
+
+ if (NOT (USE_AUTOBUILD_3P OR USE_CONAN))
+ target_compile_definitions( ll::openal INTERFACE LL_OPENAL=1)
+ include(FindPkgConfig)
+ pkg_check_modules(Openal REQUIRED freealut)
+ target_include_directories(ll::openal SYSTEM INTERFACE ${Openal_INCLUDE_DIRS})
+ target_link_directories(ll::openal INTERFACE ${Openal_LIBRARY_DIRS})
+ target_link_libraries(ll::openal INTERFACE ${Openal_LIBRARIES})
+ return ()
+ endif ()
+
target_include_directories( ll::openal SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/AL")
target_compile_definitions( ll::openal INTERFACE LL_OPENAL=1)
use_prebuilt_binary(openal)