summaryrefslogtreecommitdiff
path: root/indra/llaudio
diff options
context:
space:
mode:
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()