diff options
author | Campbell Barton <campbell@blender.org> | 2022-05-20 04:17:34 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-05-20 04:18:49 +0300 |
commit | 42a6c226d03624d880fe480eeaf2fda1bf8f5ab9 (patch) | |
tree | 5af33b6a39babb78d57ef202def1f56163a1dbbc /extern | |
parent | c1dcc64750f1e86dfc63ae9800e27dca5edf67f0 (diff) |
CMake: fix AUDASPACE disabling WITH_PYTHON for Blender
When AUDASPACE couldn't find NUMPY, it would disable WITH_PYTHON for
the rest of Blender. Now setting the value globally is only done for
standalone AUDASPACE builds. Now it's possible to build Blender with
AUDASPACE & PYTHON but without NUMPY.
While this isn't an especially important configuration to support,
having Python mysteriously disabled is a hassle to troubleshoot.
NOTE: extern/audaspace/CMakeLists.txt has become out sync with the
original [0], it seems this is being maintained in our repository.
[0]: https://github.com/neXyon/audaspace/blob/master/CMakeLists.txt
Diffstat (limited to 'extern')
-rw-r--r-- | extern/audaspace/CMakeLists.txt | 68 |
1 files changed, 56 insertions, 12 deletions
diff --git a/extern/audaspace/CMakeLists.txt b/extern/audaspace/CMakeLists.txt index 9877c8f7768..ca1849321e2 100644 --- a/extern/audaspace/CMakeLists.txt +++ b/extern/audaspace/CMakeLists.txt @@ -450,7 +450,11 @@ if(WITH_COREAUDIO) if(WITH_STRICT_DEPENDENCIES) message(FATAL_ERROR "CoreAudio not found!") else() - set(WITH_COREAUDIO FALSE CACHE BOOL "Build With CoreAudio" FORCE) + if(AUDASPACE_STANDALONE) + set(WITH_COREAUDIO FALSE CACHE BOOL "Build With CoreAudio" FORCE) + else() + set(WITH_COREAUDIO FALSE) + endif() message(WARNING "CoreAudio not found, plugin will not be built.") endif() endif() @@ -487,7 +491,11 @@ if(WITH_FFMPEG) list(APPEND DLLS ${FFMPEG_DLLS}) endif() else() - set(WITH_FFMPEG FALSE CACHE BOOL "Build With FFMPEG" FORCE) + if(AUDASPACE_STANDALONE) + set(WITH_FFMPEG FALSE CACHE BOOL "Build With FFMPEG" FORCE) + else() + set(WITH_FFMPEG FALSE) + endif() message(WARNING "FFMPEG not found, plugin will not be built.") endif() endif() @@ -536,7 +544,11 @@ if(WITH_FFTW) list(APPEND DLLS ${FFTW_DLLS}) endif() else() - set(WITH_FFTW FALSE CACHE BOOL "Build With FFTW" FORCE) + if(AUDASPACE_STANDALONE) + set(WITH_FFTW FALSE CACHE BOOL "Build With FFTW" FORCE) + else() + set(WITH_FFTW FALSE) + endif() message(WARNING "FFTW not found, convolution functionality will not be built.") endif() endif() @@ -579,7 +591,11 @@ if(WITH_JACK) list(APPEND DLLS ${JACK_DLLS}) endif() else() - set(WITH_JACK FALSE CACHE BOOL "Build With JACK" FORCE) + if(AUDASPACE_STANDALONE) + set(WITH_JACK FALSE CACHE BOOL "Build With JACK" FORCE) + else() + set(WITH_JACK FALSE) + endif() message(WARNING "JACK not found, plugin will not be built.") endif() endif() @@ -615,7 +631,11 @@ if(WITH_LIBSNDFILE) list(APPEND DLLS ${LIBSNDFILE_DLLS}) endif() else() - set(WITH_LIBSNDFILE FALSE CACHE BOOL "Build With LibSndFile" FORCE) + if(AUDASPACE_STANDALONE) + set(WITH_LIBSNDFILE FALSE CACHE BOOL "Build With LibSndFile" FORCE) + else() + set(WITH_LIBSNDFILE FALSE) + endif() message(WARNING "LibSndFile not found, plugin will not be built.") endif() endif() @@ -649,7 +669,11 @@ if(WITH_OPENAL) list(APPEND DLLS ${OPENAL_DLLS}) endif() else() - set(WITH_OPENAL FALSE CACHE BOOL "Build With OpenAL" FORCE) + if(AUDASPACE_STANDALONE) + set(WITH_OPENAL FALSE CACHE BOOL "Build With OpenAL" FORCE) + else() + set(WITH_OPENAL FALSE) + endif() message(WARNING "OpenAL not found, plugin will not be built.") endif() endif() @@ -685,7 +709,11 @@ if(WITH_PULSEAUDIO) list(APPEND STATIC_PLUGINS PulseAudioDevice) endif() else() - set(WITH_PULSEAUDIO FALSE CACHE BOOL "Build With PulseAudio" FORCE) + if(AUDASPACE_STANDALONE) + set(WITH_PULSEAUDIO FALSE CACHE BOOL "Build With PulseAudio" FORCE) + else() + set(WITH_PULSEAUDIO FALSE) + endif() message(WARNING "PulseAudio not found, plugin will not be built.") endif() endif() @@ -716,8 +744,12 @@ if(WITH_PYTHON) list(APPEND DLLS ${PYTHON_DLLS}) endif() else() - set(WITH_PYTHON FALSE CACHE BOOL "Build With Python Library" FORCE) - message(WARNING "Python libraries not found, language binding will not be built.") + if(AUDASPACE_STANDALONE) + set(WITH_PYTHON FALSE CACHE BOOL "Build With Python Library" FORCE) + else() + set(WITH_PYTHON FALSE) + endif() + message(WARNING "Python & NumPy libraries not found, language binding will not be built.") endif() endif() @@ -759,7 +791,11 @@ if(WITH_SDL) list(APPEND DLLS ${SDL_DLLS}) endif() else() - set(WITH_SDL FALSE CACHE BOOL "Build With SDL" FORCE) + if(AUDASPACE_STANDALONE) + set(WITH_SDL FALSE CACHE BOOL "Build With SDL" FORCE) + else() + set(WITH_SDL FALSE) + endif() message(WARNING "SDL not found, plugin will not be built.") endif() endif() @@ -1116,7 +1152,11 @@ if(WITH_DOCS) add_custom_target(audaspace_doc ALL ${DOXYGEN_EXECUTABLE} Doxyfile COMMENT "Building C++ HTML documentation with Doxygen.") else() - set(WITH_DOCS FALSE CACHE BOOL "Build C++ HTML Documentation with Doxygen" FORCE) + if(AUDASPACE_STANDALONE) + set(WITH_DOCS FALSE CACHE BOOL "Build C++ HTML Documentation with Doxygen" FORCE) + else() + set(WITH_DOCS FALSE) + endif() message(WARNING "Doxygen (and/or dot) not found, documentation will not be built.") endif() endif() @@ -1129,7 +1169,11 @@ if(WITH_BINDING_DOCS) add_custom_target(bindings_doc ALL COMMAND ${PYTHON_EXECUTABLE} setup.py --build-docs ${SPHINX_EXECUTABLE} -q -b html -c "${CMAKE_CURRENT_BINARY_DIR}" -d "${CMAKE_CURRENT_BINARY_DIR}/_doctrees" "${CMAKE_CURRENT_SOURCE_DIR}/bindings/doc" "${CMAKE_CURRENT_BINARY_DIR}/doc/bindings" DEPENDS pythonmodule COMMENT "Building C/Python HTML documentation with Sphinx.") else() - set(WITH_BINDING_DOCS FALSE CACHE BOOL "Build C/Python HTML Documentation with Sphinx" FORCE) + if(AUDASPACE_STANDALONE) + set(WITH_BINDING_DOCS FALSE CACHE BOOL "Build C/Python HTML Documentation with Sphinx" FORCE) + else() + set(WITH_BINDING_DOCS FALSE) + endif() message(WARNING "Sphinx not found, binding documentation will not be built.") endif() endif() |