mirror of
https://github.com/blender/blender
synced 2026-10-25 03:07:01 +03:00
Currently when building WITH_SDL=ON (such as when using WITH_GHOST_SDL=ON) but also WITH_SDL_AUDIO=OFF, the Audaspace CMake module would issue the following warning: ``` CMake Warning at extern/audaspace/CMakeLists.txt:879 (message): SDL not found, plugin will not be built. ``` This was due to the Audaspace module inheriting its WITH_SDL value from the root Blender CMakeLists.txt, causing it to build WITH_SDL=ON and WITH_SDL_FOUND=OFF, causing the logic to fall in fallback path and issuing this warning. Fixed by properly setting the Audaspace specific WITH_SDL to follow the value of Blender's WITH_SDL_AUDIO, properly keeping it sync with WITH_SDL_FOUND, and fixing the issue.
49 lines
2.3 KiB
CMake
49 lines
2.3 KiB
CMake
# Do NOT use CACHE behavior here, as this has the same effect as defining an option,
|
|
# it exposes the setting in main CMake config (which we do not want here).
|
|
|
|
set(AUDASPACE_STANDALONE FALSE)
|
|
set(BUILD_DEMOS FALSE) # "Build and install demos"
|
|
set(SHARED_LIBRARY FALSE) # "Build Shared Library"
|
|
set(WITH_C FALSE) # "Build C Module"
|
|
set(WITH_DOCS FALSE) # "Build C++ HTML Documentation with Doxygen"
|
|
set(WITH_FFMPEG ${WITH_CODEC_FFMPEG}) # "Build With FFMPEG"
|
|
if(DEFINED WITH_FFTW3 AND WITH_FFTW3) # "Build With FFTW"
|
|
set(FFTW_FOUND TRUE)
|
|
set(WITH_FFTW ${WITH_FFTW3})
|
|
set(FFTW_INCLUDE_DIR ${FFTW3_INCLUDE_DIRS})
|
|
set(FFTW_LIBRARY ${FFTW3_LIBRARIES})
|
|
endif()
|
|
set(WITH_LIBSNDFILE ${WITH_CODEC_SNDFILE}) # "Build With LibSndFile"
|
|
set(WITH_RUBBERBAND ${WITH_RUBBERBAND}) # "Build With Rubber Band Library"
|
|
set(SEPARATE_C FALSE) # "Build C Binding as separate library"
|
|
set(PLUGIN_COREAUDIO FALSE) # "Build CoreAudio Plugin"
|
|
set(PLUGIN_FFMPEG FALSE) # "Build FFMPEG Plugin"
|
|
set(PLUGIN_JACK FALSE) # "Build JACK Plugin"
|
|
set(PLUGIN_LIBSNDFILE FALSE) # "Build LibSndFile Plugin"
|
|
set(PLUGIN_OPENAL FALSE) # "Build OpenAL Plugin"
|
|
set(PLUGIN_PIPEWIRE FALSE) # "Build PipeWire Plugin"
|
|
set(PLUGIN_PULSEAUDIO FALSE) # "Build PulseAudio Plugin"
|
|
set(PLUGIN_SDL FALSE) # "Build SDL Plugin"
|
|
set(PLUGIN_WASAPI FALSE) # "Build WASAPI Plugin"
|
|
set(WITH_PYTHON_MODULE FALSE) # "Build Python Module"
|
|
set(DYNLOAD_JACK ${WITH_JACK_DYNLOAD}) # "Dynamically load JACK"
|
|
set(DYNLOAD_PULSEAUDIO ${WITH_PULSEAUDIO_DYNLOAD}) # "Dynamically load PulseAudio"
|
|
set(DYNLOAD_PIPEWIRE ${WITH_PIPEWIRE_DYNLOAD}) # "Dynamically load PipeWire"
|
|
set(WITH_BINDING_DOCS FALSE) # "Build C/Python HTML Documentation with Sphinx"
|
|
set(DEFAULT_PLUGIN_PATH "plugins") # "Default plugin installation and loading path."
|
|
set(FFMPEG_FOUND ${WITH_CODEC_FFMPEG})
|
|
set(JACK_FOUND ${WITH_JACK})
|
|
set(LIBSNDFILE_FOUND ${WITH_CODEC_SNDFILE})
|
|
set(OPENAL_FOUND ${WITH_OPENAL})
|
|
set(LIBPULSE_FOUND ${WITH_PULSEAUDIO})
|
|
set(PYTHONLIBS_FOUND TRUE)
|
|
set(NUMPY_FOUND ${WITH_PYTHON_NUMPY})
|
|
set(NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_INCLUDE_DIRS})
|
|
|
|
set(WITH_SDL ${WITH_SDL_AUDIO}) # "Enable SDL Audio support"
|
|
set(SDL_FOUND ${WITH_SDL_AUDIO})
|
|
if(WITH_SDL_AUDIO)
|
|
set(USE_SDL3 TRUE)
|
|
set(SDL_LIBRARY bf::dependencies::optional::sdl)
|
|
get_target_property(SDL_INCLUDE_DIR SDL3::Headers INTERFACE_INCLUDE_DIRECTORIES)
|
|
endif()
|