summaryrefslogtreecommitdiff
path: root/indra/llaudio
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-04-07 00:20:59 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-04-07 00:20:59 +0300
commitf1095d78315818642e62b7f4af9984557e176b5d (patch)
tree3606970e28e1101befbc7b42ccd6033cfd839e7b /indra/llaudio
parent4042ed9701fcfa42c03fc285a757aa348f800e33 (diff)
parentc7053a6928fd5eafdc935453742e92951ae4e0c1 (diff)
Merge branch 'main' into marchcat/main-contrib-merge
# Conflicts: # indra/cmake/CMakeLists.txt # indra/llcommon/llsdserialize.cpp # indra/llcommon/llsdserialize.h # indra/llcommon/tests/llleap_test.cpp # indra/newview/llfilepicker.h # indra/newview/llfilepicker_mac.h # indra/newview/llfilepicker_mac.mm # indra/newview/skins/default/xui/en/strings.xml
Diffstat (limited to 'indra/llaudio')
-rw-r--r--indra/llaudio/CMakeLists.txt59
1 files changed, 18 insertions, 41 deletions
diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt
index 92a5cfe22f..4f469b9bb5 100644
--- a/indra/llaudio/CMakeLists.txt
+++ b/indra/llaudio/CMakeLists.txt
@@ -7,23 +7,6 @@ include(LLAudio)
include(FMODSTUDIO)
include(OPENAL)
include(LLCommon)
-include(LLMath)
-include(LLMessage)
-include(LLFileSystem)
-
-include_directories(
- ${LLAUDIO_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${OGG_INCLUDE_DIRS}
- ${VORBISENC_INCLUDE_DIRS}
- ${VORBISFILE_INCLUDE_DIRS}
- ${VORBIS_INCLUDE_DIRS}
- ${OPENAL_LIB_INCLUDE_DIRS}
- ${FREEAULT_LIB_INCLUDE_DIRS}
- )
set(llaudio_SOURCE_FILES
llaudioengine.cpp
@@ -42,10 +25,7 @@ set(llaudio_HEADER_FILES
llwindgen.h
)
-if (FMODSTUDIO)
- include_directories(
- ${FMODSTUDIO_INCLUDE_DIR}
- )
+if (TARGET ll::fmodstudio)
list(APPEND llaudio_SOURCE_FILES
llaudioengine_fmodstudio.cpp
lllistener_fmodstudio.cpp
@@ -57,13 +37,9 @@ if (FMODSTUDIO)
lllistener_fmodstudio.h
llstreamingaudio_fmodstudio.h
)
-endif (FMODSTUDIO)
-
-if (OPENAL)
- include_directories(
- ${OPENAL_LIBRARIES}
- )
+endif ()
+if (TARGET ll::openal)
list(APPEND llaudio_SOURCE_FILES
llaudioengine_openal.cpp
lllistener_openal.cpp
@@ -73,22 +49,23 @@ if (OPENAL)
llaudioengine_openal.h
lllistener_openal.h
)
-endif (OPENAL)
-
-set_source_files_properties(${llaudio_HEADER_FILES}
- PROPERTIES HEADER_FILE_ONLY TRUE)
+endif ()
list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES})
add_library (llaudio ${llaudio_SOURCE_FILES})
-target_link_libraries(
- llaudio
- ${LLCOMMON_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${VORBISENC_LIBRARIES}
- ${VORBISFILE_LIBRARIES}
- ${VORBIS_LIBRARIES}
- ${OGG_LIBRARIES}
+target_include_directories( llaudio INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+target_link_libraries( llaudio
+ llcommon
+ llmath
+ llmessage
+ llfilesystem
+ ll::vorbis
)
+
+if( TARGET ll::openal )
+ target_link_libraries( llaudio ll::openal )
+endif()
+if( TARGET ll::fmodstudio )
+ target_link_libraries( llaudio ll::fmodstudio )
+endif()