CMakeLists.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. add_library(audio_core STATIC
  2. algorithm/filter.cpp
  3. algorithm/filter.h
  4. algorithm/interpolate.cpp
  5. algorithm/interpolate.h
  6. audio_out.cpp
  7. audio_out.h
  8. audio_renderer.cpp
  9. audio_renderer.h
  10. behavior_info.cpp
  11. behavior_info.h
  12. buffer.h
  13. codec.cpp
  14. codec.h
  15. command_generator.cpp
  16. command_generator.h
  17. common.h
  18. delay_line.cpp
  19. delay_line.h
  20. effect_context.cpp
  21. effect_context.h
  22. info_updater.cpp
  23. info_updater.h
  24. memory_pool.cpp
  25. memory_pool.h
  26. mix_context.cpp
  27. mix_context.h
  28. null_sink.h
  29. sink.h
  30. sink_context.cpp
  31. sink_context.h
  32. sink_details.cpp
  33. sink_details.h
  34. sink_stream.h
  35. splitter_context.cpp
  36. splitter_context.h
  37. stream.cpp
  38. stream.h
  39. voice_context.cpp
  40. voice_context.h
  41. $<$<BOOL:${ENABLE_CUBEB}>:cubeb_sink.cpp cubeb_sink.h>
  42. $<$<BOOL:${ENABLE_SDL2}>:sdl2_sink.cpp sdl2_sink.h>
  43. )
  44. create_target_directory_groups(audio_core)
  45. if (NOT MSVC)
  46. target_compile_options(audio_core PRIVATE
  47. -Werror=conversion
  48. -Werror=ignored-qualifiers
  49. $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter>
  50. $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable>
  51. -Wno-sign-conversion
  52. )
  53. endif()
  54. target_link_libraries(audio_core PUBLIC common core)
  55. if(ENABLE_CUBEB)
  56. target_link_libraries(audio_core PRIVATE cubeb)
  57. target_compile_definitions(audio_core PRIVATE -DHAVE_CUBEB=1)
  58. endif()
  59. if(ENABLE_SDL2)
  60. target_link_libraries(audio_core PRIVATE SDL2)
  61. target_compile_definitions(audio_core PRIVATE HAVE_SDL2)
  62. endif()