The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
3.8KB

  1. cmake_minimum_required(VERSION 3.4.1)
  2. # Set the name of the project and store it in PROJECT_NAME. Also set the following variables:
  3. # PROJECT_SOURCE_DIR (usually the root directory where Oboe has been cloned e.g.)
  4. # PROJECT_BINARY_DIR (usually the containing project's binary directory,
  5. # e.g. ${OBOE_HOME}/samples/RhythmGame/.externalNativeBuild/cmake/ndkExtractorDebug/x86/oboe-bin)
  6. project(oboe)
  7. set (oboe_sources
  8. src/aaudio/AAudioLoader.cpp
  9. src/aaudio/AudioStreamAAudio.cpp
  10. src/common/AdpfWrapper.cpp
  11. src/common/AudioSourceCaller.cpp
  12. src/common/AudioStream.cpp
  13. src/common/AudioStreamBuilder.cpp
  14. src/common/DataConversionFlowGraph.cpp
  15. src/common/FilterAudioStream.cpp
  16. src/common/FixedBlockAdapter.cpp
  17. src/common/FixedBlockReader.cpp
  18. src/common/FixedBlockWriter.cpp
  19. src/common/LatencyTuner.cpp
  20. src/common/OboeExtensions.cpp
  21. src/common/SourceFloatCaller.cpp
  22. src/common/SourceI16Caller.cpp
  23. src/common/SourceI24Caller.cpp
  24. src/common/SourceI32Caller.cpp
  25. src/common/Utilities.cpp
  26. src/common/QuirksManager.cpp
  27. src/fifo/FifoBuffer.cpp
  28. src/fifo/FifoController.cpp
  29. src/fifo/FifoControllerBase.cpp
  30. src/fifo/FifoControllerIndirect.cpp
  31. src/flowgraph/FlowGraphNode.cpp
  32. src/flowgraph/ChannelCountConverter.cpp
  33. src/flowgraph/ClipToRange.cpp
  34. src/flowgraph/Limiter.cpp
  35. src/flowgraph/ManyToMultiConverter.cpp
  36. src/flowgraph/MonoBlend.cpp
  37. src/flowgraph/MonoToMultiConverter.cpp
  38. src/flowgraph/MultiToManyConverter.cpp
  39. src/flowgraph/MultiToMonoConverter.cpp
  40. src/flowgraph/RampLinear.cpp
  41. src/flowgraph/SampleRateConverter.cpp
  42. src/flowgraph/SinkFloat.cpp
  43. src/flowgraph/SinkI16.cpp
  44. src/flowgraph/SinkI24.cpp
  45. src/flowgraph/SinkI32.cpp
  46. src/flowgraph/SourceFloat.cpp
  47. src/flowgraph/SourceI16.cpp
  48. src/flowgraph/SourceI24.cpp
  49. src/flowgraph/SourceI32.cpp
  50. src/flowgraph/resampler/IntegerRatio.cpp
  51. src/flowgraph/resampler/LinearResampler.cpp
  52. src/flowgraph/resampler/MultiChannelResampler.cpp
  53. src/flowgraph/resampler/PolyphaseResampler.cpp
  54. src/flowgraph/resampler/PolyphaseResamplerMono.cpp
  55. src/flowgraph/resampler/PolyphaseResamplerStereo.cpp
  56. src/flowgraph/resampler/SincResampler.cpp
  57. src/flowgraph/resampler/SincResamplerStereo.cpp
  58. src/opensles/AudioInputStreamOpenSLES.cpp
  59. src/opensles/AudioOutputStreamOpenSLES.cpp
  60. src/opensles/AudioStreamBuffered.cpp
  61. src/opensles/AudioStreamOpenSLES.cpp
  62. src/opensles/EngineOpenSLES.cpp
  63. src/opensles/OpenSLESUtilities.cpp
  64. src/opensles/OutputMixerOpenSLES.cpp
  65. src/common/StabilizedCallback.cpp
  66. src/common/Trace.cpp
  67. src/common/Version.cpp
  68. )
  69. add_library(oboe ${oboe_sources})
  70. # Specify directories which the compiler should look for headers
  71. target_include_directories(oboe
  72. PRIVATE src
  73. PUBLIC include)
  74. # JUCE CHANGE STARTS HERE
  75. # This comment provided for Apache License compliance. We've removed the extra warnings flags and
  76. # the `-Werror` option, to avoid cases where compilers produce unexpected errors and fail the build.
  77. # We've also removed the explicit `-std=c++17` compile option, and replaced it with a more
  78. # cmake-friendly way of specifying the language standard.
  79. target_compile_options(oboe
  80. PRIVATE
  81. "$<$<CONFIG:RELEASE>:-Ofast>"
  82. "$<$<CONFIG:DEBUG>:-O3>")
  83. target_compile_features(oboe PRIVATE cxx_std_17)
  84. # JUCE CHANGE ENDS HERE
  85. # Enable logging of D,V for debug builds
  86. target_compile_definitions(oboe PUBLIC $<$<CONFIG:DEBUG>:OBOE_ENABLE_LOGGING=1>)
  87. target_link_libraries(oboe PRIVATE log OpenSLES)
  88. # When installing oboe put the libraries in the lib/<ABI> folder e.g. lib/arm64-v8a
  89. install(TARGETS oboe
  90. LIBRARY DESTINATION lib/${ANDROID_ABI}
  91. ARCHIVE DESTINATION lib/${ANDROID_ABI})
  92. # Also install the headers
  93. install(DIRECTORY include/oboe DESTINATION include)