Page MenuHome

Tweak needed to Audaspace CMake options
Closed, ResolvedPublic

Description

Just noted today that we have several CMake options related to Audaspace, which do not blend well in global blender CMake ecosystem I think…

  1. DEFAULT_PLUGIN_PATH - shoudl have an AUDASPACE_ prefix.
  2. DOCUMENTATION_INSTALL_PATH - also should have an AUDASPACE_ prefix, but more annoying, that one does not seem to take into account the global install path (seems to be fixed on share/doc/audaspace, when the former properly points to ${CMAKE_INSTALL_PREFIX}/share/audaspace/plugins).
  3. PLUGIN_XXX - also should have an AUDASPACE_ prefix.
  4. Many WITH_ (like WITH_FFTW, WITH_LIBSNDFILE, etc.) also need an AUDASPACE_ prefix.

Not being able to tell that an option is part of a sub-module of Blender is really annoying…

Build Error

Looks like AUD_HRTF is not properly disabled when libfftw is not found (which disables convolution), this breaks compiling. And on modern linux we only have libfftw3, btw. :/

Related Objects

Event Timeline

Bastien Montagne (mont29) triaged this task as Confirmed, Medium priority.

Here is a patch fixing the issue:

1diff --git a/extern/audaspace/blender_config.cmake b/extern/audaspace/blender_config.cmake
2index 0cf4709965f..320e0b48fd9 100644
3--- a/extern/audaspace/blender_config.cmake
4+++ b/extern/audaspace/blender_config.cmake
5@@ -1,20 +1,23 @@
6+# Do NOT use CACHE behavior here, as this has the same effect as defining an option,
7+# it exposes the setting in main CMake config (which we do not want here).
8+
9 set(AUDASPACE_STANDALONE FALSE)
10-set(BUILD_DEMOS FALSE CACHE BOOL "Build and install demos")
11-set(SHARED_LIBRARY FALSE CACHE BOOL "Build Shared Library")
12-set(WITH_C TRUE CACHE BOOL "Build C Module")
13-set(WITH_DOCS FALSE CACHE BOOL "Build C++ HTML Documentation with Doxygen")
14-set(WITH_FFMPEG ${WITH_CODEC_FFMPEG} CACHE BOOL "Build With FFMPEG")
15-set(WITH_FFTW FALSE CACHE BOOL "Build With FFTW")
16-set(WITH_LIBSNDFILE ${WITH_CODEC_SNDFILE} CACHE BOOL "Build With LibSndFile")
17-set(SEPARATE_C FALSE CACHE BOOL "Build C Binding as separate library")
18-set(PLUGIN_FFMPEG FALSE CACHE BOOL "Build FFMPEG Plugin")
19-set(PLUGIN_JACK FALSE CACHE BOOL "Build JACK Plugin")
20-set(PLUGIN_LIBSNDFILE FALSE CACHE BOOL "Build LibSndFile Plugin")
21-set(PLUGIN_OPENAL FALSE CACHE BOOL "Build OpenAL Plugin")
22-set(PLUGIN_SDL FALSE CACHE BOOL "Build SDL Plugin")
23-set(WITH_PYTHON_MODULE FALSE CACHE BOOL "Build Python Module")
24-set(DYNLOAD_JACK ${WITH_JACK_DYNLOAD} CACHE BOOL "Dynamically load JACK")
25-set(WITH_BINDING_DOCS FALSE CACHE BOOL "Build C/Python HTML Documentation with Sphinx")
26+set(BUILD_DEMOS FALSE) # "Build and install demos"
27+set(SHARED_LIBRARY FALSE) # "Build Shared Library"
28+set(WITH_C TRUE) # "Build C Module"
29+set(WITH_DOCS FALSE) # "Build C++ HTML Documentation with Doxygen"
30+set(WITH_FFMPEG ${WITH_CODEC_FFMPEG}) # "Build With FFMPEG"
31+set(WITH_FFTW FALSE) # "Build With FFTW"
32+set(WITH_LIBSNDFILE ${WITH_CODEC_SNDFILE}) # "Build With LibSndFile"
33+set(SEPARATE_C FALSE) # "Build C Binding as separate library"
34+set(PLUGIN_FFMPEG FALSE) # "Build FFMPEG Plugin"
35+set(PLUGIN_JACK FALSE) # "Build JACK Plugin"
36+set(PLUGIN_LIBSNDFILE FALSE) # "Build LibSndFile Plugin"
37+set(PLUGIN_OPENAL FALSE) # "Build OpenAL Plugin"
38+set(PLUGIN_SDL FALSE) # "Build SDL Plugin"
39+set(WITH_PYTHON_MODULE FALSE) # "Build Python Module"
40+set(DYNLOAD_JACK ${WITH_JACK_DYNLOAD}) # "Dynamically load JACK"
41+set(WITH_BINDING_DOCS FALSE) # "Build C/Python HTML Documentation with Sphinx"
42 set(FFMPEG_FOUND ${WITH_CODEC_FFMPEG})
43 set(JACK_FOUND ${WITH_JACK})
44 set(LIBSNDFILE_FOUND ${WITH_CODEC_SNDFILE})
45@@ -25,7 +28,5 @@ set(NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_INCLUDE_DIRS})
46 set(SDL_FOUND ${WITH_SDL})
47
48 if(WIN32)
49- set(DEFAULT_PLUGIN_PATH "plugins" CACHE STRING "Default plugin installation and loading path.")
50+ set(DEFAULT_PLUGIN_PATH "plugins") # "Default plugin installation and loading path."
51 endif()
52-
53-mark_as_advanced(BUILD_DEMOS SHARED_LIBRARY WITH_C WITH_DOCS WITH_FFMPEG WITH_FFTW WITH_LIBSNDFILE SEPARATE_C PLUGIN_FFMPEG PLUGIN_JACK PLUGIN_LIBSNDFILE PLUGIN_OPENAL PLUGIN_SDL WITH_PYTHON_MODULE DYNLOAD_JACK WITH_BINDING_DOCS DEFAULT_PLUGIN_PATH)