PageRenderTime 23ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llaudio/CMakeLists.txt

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 95 lines | 79 code | 15 blank | 1 comment | 3 complexity | 8908fef19f9a78cb4f85859053a49228 MD5 | raw file
 1# -*- cmake -*-
 2
 3project(llaudio)
 4
 5include(00-Common)
 6include(Audio)
 7include(LLAudio)
 8include(FMOD)
 9include(OPENAL)
10include(LLCommon)
11include(LLMath)
12include(LLMessage)
13include(LLVFS)
14
15include_directories(
16    ${LLAUDIO_INCLUDE_DIRS}
17    ${LLCOMMON_INCLUDE_DIRS}
18    ${LLMATH_INCLUDE_DIRS}
19    ${LLMESSAGE_INCLUDE_DIRS}
20    ${LLVFS_INCLUDE_DIRS}
21    ${OGG_INCLUDE_DIRS}
22    ${VORBISENC_INCLUDE_DIRS}
23    ${VORBISFILE_INCLUDE_DIRS}
24    ${VORBIS_INCLUDE_DIRS}
25    ${OPENAL_LIB_INCLUDE_DIRS}
26    ${FREEAULT_LIB_INCLUDE_DIRS}
27    ${FMOD_INCLUDE_DIR}
28    )
29
30set(llaudio_SOURCE_FILES
31    llaudioengine.cpp
32    lllistener.cpp
33    llaudiodecodemgr.cpp
34    llvorbisencode.cpp
35    )
36
37set(llaudio_HEADER_FILES
38    CMakeLists.txt
39
40    llaudioengine.h
41    lllistener.h
42    llaudiodecodemgr.h
43    llvorbisencode.h
44    llwindgen.h
45    )
46
47if (FMOD)
48    include_directories(
49        ${FMOD_INCLUDE_DIR}
50        )
51
52    list(APPEND llaudio_SOURCE_FILES
53         llaudioengine_fmod.cpp
54         lllistener_fmod.cpp
55         llstreamingaudio_fmod.cpp
56         )
57
58    list(APPEND llaudio_HEADER_FILES
59         llaudioengine_fmod.h
60         lllistener_fmod.h
61         llstreamingaudio_fmod.h
62         )
63
64    if (LINUX OR DARWIN)
65      set_source_files_properties(llaudioengine_fmod.cpp
66                                  llstreamingaudio_fmod.cpp
67                                  COMPILE_FLAGS -Wno-write-strings)
68    endif (LINUX OR DARWIN)
69endif (FMOD)
70
71if (OPENAL)
72  list(APPEND llaudio_SOURCE_FILES
73    llaudioengine_openal.cpp
74    lllistener_openal.cpp
75    )
76  
77  list(APPEND llaudio_HEADER_FILES
78    llaudioengine_openal.h
79    lllistener_openal.h
80    )
81endif (OPENAL)
82
83set_source_files_properties(${llaudio_HEADER_FILES}
84                            PROPERTIES HEADER_FILE_ONLY TRUE)
85
86list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES})
87
88add_library (llaudio ${llaudio_SOURCE_FILES})
89target_link_libraries(
90    llaudio
91    ${VORBISENC_LIBRARIES}
92    ${VORBISFILE_LIBRARIES}
93    ${VORBIS_LIBRARIES}
94    ${OGG_LIBRARIES}
95    )