CMakeLists.txt 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. set(COCOS_AUDIO_SRC
  2. audio/AudioEngine.cpp
  3. )
  4. if(WINDOWS)
  5. set(COCOS_AUDIO_PLATFORM_HEADER
  6. audio/win32/AudioDecoderManager.h
  7. audio/win32/AudioDecoder.h
  8. audio/win32/MciPlayer.h
  9. audio/win32/AudioPlayer.h
  10. audio/win32/AudioDecoderOgg.h
  11. audio/win32/AudioMacros.h
  12. audio/win32/AudioEngine-win32.h
  13. audio/win32/AudioDecoderMp3.h
  14. audio/win32/AudioCache.h
  15. )
  16. set(COCOS_AUDIO_PLATFORM_SRC
  17. audio/win32/SimpleAudioEngine.cpp
  18. audio/win32/MciPlayer.cpp
  19. audio/win32/MciPlayer.h
  20. audio/win32/AudioEngine-win32.cpp
  21. audio/win32/AudioCache.cpp
  22. audio/win32/AudioPlayer.cpp
  23. audio/win32/AudioDecoder.cpp
  24. audio/win32/AudioDecoderManager.cpp
  25. audio/win32/AudioDecoderMp3.cpp
  26. audio/win32/AudioDecoderOgg.cpp
  27. )
  28. elseif(ANDROID)
  29. set(COCOS_AUDIO_PLATFORM_HEADER
  30. audio/android/PcmAudioService.h
  31. audio/android/AudioBufferProvider.h
  32. audio/android/IAudioPlayer.h
  33. audio/android/AudioResampler.h
  34. audio/android/AudioDecoder.h
  35. audio/android/AudioResamplerPublic.h
  36. audio/android/AudioMixer.h
  37. audio/android/tinysndfile.h
  38. audio/android/mp3reader.h
  39. audio/android/AudioMixerOps.h
  40. audio/android/cutils/bitops.h
  41. audio/android/cutils/log.h
  42. audio/android/audio.h
  43. audio/android/AudioPlayerProvider.h
  44. audio/android/utils/Utils.h
  45. audio/android/utils/Errors.h
  46. audio/android/utils/Compat.h
  47. audio/android/ccdandroidUtils.h
  48. audio/android/AudioDecoderOgg.h
  49. audio/android/Track.h
  50. audio/android/OpenSLHelper.h
  51. audio/android/PcmAudioPlayer.h
  52. audio/android/AssetFd.h
  53. audio/android/PcmBufferProvider.h
  54. audio/android/CCThreadPool.h
  55. audio/android/audio_utils/include/audio_utils/minifloat.h
  56. audio/android/audio_utils/include/audio_utils/primitives.h
  57. audio/android/audio_utils/include/audio_utils/format.h
  58. audio/android/audio_utils/private/private.h
  59. audio/android/ICallerThreadUtils.h
  60. audio/android/AudioDecoderWav.h
  61. audio/android/AudioDecoderProvider.h
  62. audio/android/UrlAudioPlayer.h
  63. audio/android/AudioDecoderSLES.h
  64. audio/android/AudioDecoderMp3.h
  65. audio/android/PcmData.h
  66. audio/android/jni/cddandroidAndroidJavaEngine.h
  67. audio/android/AudioMixerController.h
  68. audio/android/AudioResamplerCubic.h
  69. audio/android/AudioEngine-inl.h
  70. audio/android/IVolumeProvider.h
  71. )
  72. set(COCOS_AUDIO_PLATFORM_SRC
  73. audio/android/cddSimpleAudioEngine.cpp
  74. audio/android/ccdandroidUtils.cpp
  75. audio/android/jni/cddandroidAndroidJavaEngine.cpp
  76. audio/android/AudioEngine-inl.cpp
  77. audio/android/CCThreadPool.cpp
  78. audio/android/AssetFd.cpp
  79. audio/android/AudioDecoder.cpp
  80. audio/android/AudioDecoderProvider.cpp
  81. audio/android/AudioDecoderSLES.cpp
  82. audio/android/AudioDecoderOgg.cpp
  83. audio/android/AudioDecoderMp3.cpp
  84. audio/android/AudioDecoderWav.cpp
  85. audio/android/AudioPlayerProvider.cpp
  86. audio/android/AudioResampler.cpp
  87. audio/android/AudioResamplerCubic.cpp
  88. audio/android/PcmBufferProvider.cpp
  89. audio/android/PcmAudioPlayer.cpp
  90. audio/android/UrlAudioPlayer.cpp
  91. audio/android/PcmData.cpp
  92. audio/android/AudioMixerController.cpp
  93. audio/android/AudioMixer.cpp
  94. audio/android/PcmAudioService.cpp
  95. audio/android/Track.cpp
  96. audio/android/audio_utils/format.c
  97. audio/android/audio_utils/minifloat.cpp
  98. audio/android/audio_utils/primitives.c
  99. audio/android/utils/Utils.cpp
  100. audio/android/mp3reader.cpp
  101. audio/android/tinysndfile.cpp
  102. )
  103. elseif(LINUX)
  104. set(COCOS_AUDIO_PLATFORM_HEADER
  105. audio/linux/AudioEngine-linux.h
  106. )
  107. set(COCOS_AUDIO_PLATFORM_SRC
  108. audio/linux/SimpleAudioEngine.cpp
  109. audio/linux/AudioEngine-linux.h
  110. audio/linux/AudioEngine-linux.cpp
  111. )
  112. elseif(APPLE)
  113. # common
  114. set(COCOS_AUDIO_PLATFORM_HEADER
  115. audio/apple/AudioDecoder.h
  116. audio/apple/AudioPlayer.h
  117. audio/apple/AudioMacros.h
  118. audio/apple/AudioCache.h
  119. audio/apple/AudioEngine-inl.h
  120. )
  121. set(COCOS_AUDIO_PLATFORM_SRC
  122. audio/apple/AudioCache.mm
  123. audio/apple/AudioDecoder.mm
  124. audio/apple/AudioEngine-inl.mm
  125. audio/apple/AudioPlayer.mm
  126. )
  127. # split it in _C and non C
  128. # because C files needs to be compiled with C compiler and not C++
  129. # compiler
  130. if(MACOSX)
  131. set(COCOS_AUDIO_PLATFORM_HEADER
  132. ${COCOS_AUDIO_PLATFORM_HEADER}
  133. audio/mac/CDConfig.h
  134. audio/mac/SimpleAudioEngine_objc.h
  135. audio/mac/CDOpenALSupport.h
  136. audio/mac/CDXMacOSXSupport.h
  137. audio/mac/CDAudioManager.h
  138. audio/mac/CocosDenshion.h
  139. )
  140. set(COCOS_AUDIO_PLATFORM_SRC_C
  141. audio/mac/CDAudioManager.m
  142. audio/mac/CDOpenALSupport.m
  143. audio/mac/CocosDenshion.m
  144. audio/mac/SimpleAudioEngine_objc.m
  145. )
  146. set(COCOS_AUDIO_PLATFORM_SRC
  147. ${COCOS_AUDIO_PLATFORM_SRC_C}
  148. ${COCOS_AUDIO_PLATFORM_SRC}
  149. audio/mac/SimpleAudioEngine.mm
  150. audio/mac/CDXMacOSXSupport.mm
  151. )
  152. elseif(IOS)
  153. set(COCOS_AUDIO_PLATFORM_HEADER
  154. ${COCOS_AUDIO_PLATFORM_HEADER}
  155. audio/ios/CDConfig.h
  156. audio/ios/SimpleAudioEngine_objc.h
  157. audio/ios/CDOpenALSupport.h
  158. audio/ios/CDAudioManager.h
  159. audio/ios/CocosDenshion.h
  160. )
  161. set(COCOS_AUDIO_PLATFORM_SRC_C
  162. audio/ios/CDAudioManager.m
  163. audio/ios/CDOpenALSupport.m
  164. audio/ios/CocosDenshion.m
  165. audio/ios/SimpleAudioEngine_objc.m
  166. )
  167. set(COCOS_AUDIO_PLATFORM_SRC
  168. ${COCOS_AUDIO_PLATFORM_SRC_C}
  169. ${COCOS_AUDIO_PLATFORM_SRC}
  170. audio/ios/SimpleAudioEngine.mm
  171. )
  172. endif()
  173. set_source_files_properties(
  174. ${COCOS_AUDIO_PLATFORM_SRC_C}
  175. PROPERTIES LANGUAGE C
  176. )
  177. endif()
  178. set(COCOS_AUDIO_HEADER ${COCOS_AUDIO_PLATFORM_HEADER})
  179. list(APPEND COCOS_AUDIO_SRC ${COCOS_AUDIO_PLATFORM_SRC})