Tweak needed to Audaspace CMake options #64480

Closed
opened 2019-05-11 12:28:51 +02:00 by Bastien Montagne · 4 comments

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

  • DEFAULT_PLUGIN_PATH - shoudl have an AUDASPACE_ prefix.
  • 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).
  • PLUGIN_XXX - also should have an AUDASPACE_ prefix.
  • 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. :/

Just noted today that we have several CMake options related to Audaspace, which do not blend well in global blender CMake ecosystem I think… - `DEFAULT_PLUGIN_PATH` - shoudl have an `AUDASPACE_` prefix. - `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`). - `PLUGIN_XXX` - also should have an `AUDASPACE_` prefix. - 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. :/
Joerg Mueller was assigned by Bastien Montagne 2019-05-11 12:28:51 +02:00
Author
Owner

Added subscriber: @mont29

Added subscriber: @mont29
Author
Owner

Here is a patch fixing the issue:

P978: (An Untitled Masterwork)

diff --git a/extern/audaspace/blender_config.cmake b/extern/audaspace/blender_config.cmake
index 0cf4709965f..320e0b48fd9 100644
--- a/extern/audaspace/blender_config.cmake
+++ b/extern/audaspace/blender_config.cmake
@@ -1,20 +1,23 @@
+# 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 CACHE BOOL "Build and install demos")
-set(SHARED_LIBRARY FALSE CACHE BOOL "Build Shared Library")
-set(WITH_C TRUE CACHE BOOL "Build C Module")
-set(WITH_DOCS FALSE CACHE BOOL "Build C++ HTML Documentation with Doxygen")
-set(WITH_FFMPEG ${WITH_CODEC_FFMPEG} CACHE BOOL "Build With FFMPEG")
-set(WITH_FFTW FALSE CACHE BOOL "Build With FFTW")
-set(WITH_LIBSNDFILE ${WITH_CODEC_SNDFILE} CACHE BOOL "Build With LibSndFile")
-set(SEPARATE_C FALSE CACHE BOOL "Build C Binding as separate library")
-set(PLUGIN_FFMPEG FALSE CACHE BOOL "Build FFMPEG Plugin")
-set(PLUGIN_JACK FALSE CACHE BOOL "Build JACK Plugin")
-set(PLUGIN_LIBSNDFILE FALSE CACHE BOOL "Build LibSndFile Plugin")
-set(PLUGIN_OPENAL FALSE CACHE BOOL "Build OpenAL Plugin")
-set(PLUGIN_SDL FALSE CACHE BOOL "Build SDL Plugin")
-set(WITH_PYTHON_MODULE FALSE CACHE BOOL "Build Python Module")
-set(DYNLOAD_JACK ${WITH_JACK_DYNLOAD} CACHE BOOL "Dynamically load JACK")
-set(WITH_BINDING_DOCS FALSE CACHE BOOL "Build C/Python HTML Documentation with Sphinx")
+set(BUILD_DEMOS FALSE)  # "Build and install demos"
+set(SHARED_LIBRARY FALSE)  # "Build Shared Library"
+set(WITH_C TRUE)  # "Build C Module"
+set(WITH_DOCS FALSE)  # "Build C++ HTML Documentation with Doxygen"
+set(WITH_FFMPEG ${WITH_CODEC_FFMPEG})  # "Build With FFMPEG"
+set(WITH_FFTW FALSE)  # "Build With FFTW"
+set(WITH_LIBSNDFILE ${WITH_CODEC_SNDFILE})  # "Build With LibSndFile"
+set(SEPARATE_C FALSE)  # "Build C Binding as separate library"
+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_SDL FALSE)  # "Build SDL Plugin"
+set(WITH_PYTHON_MODULE FALSE)  # "Build Python Module"
+set(DYNLOAD_JACK ${WITH_JACK_DYNLOAD})  # "Dynamically load JACK"
+set(WITH_BINDING_DOCS FALSE)  # "Build C/Python HTML Documentation with Sphinx"
 set(FFMPEG_FOUND ${WITH_CODEC_FFMPEG})
 set(JACK_FOUND ${WITH_JACK})
 set(LIBSNDFILE_FOUND ${WITH_CODEC_SNDFILE})
@@ -25,7 +28,5 @@ set(NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_INCLUDE_DIRS})
 set(SDL_FOUND ${WITH_SDL})
 
 if(WIN32)
-  set(DEFAULT_PLUGIN_PATH "plugins" CACHE STRING "Default plugin installation and loading path.")
+  set(DEFAULT_PLUGIN_PATH "plugins")  # "Default plugin installation and loading path."
 endif()
-
-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)

Here is a patch fixing the issue: [P978: (An Untitled Masterwork)](https://archive.blender.org/developer/P978.txt) ``` diff --git a/extern/audaspace/blender_config.cmake b/extern/audaspace/blender_config.cmake index 0cf4709965f..320e0b48fd9 100644 --- a/extern/audaspace/blender_config.cmake +++ b/extern/audaspace/blender_config.cmake @@ -1,20 +1,23 @@ +# 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 CACHE BOOL "Build and install demos") -set(SHARED_LIBRARY FALSE CACHE BOOL "Build Shared Library") -set(WITH_C TRUE CACHE BOOL "Build C Module") -set(WITH_DOCS FALSE CACHE BOOL "Build C++ HTML Documentation with Doxygen") -set(WITH_FFMPEG ${WITH_CODEC_FFMPEG} CACHE BOOL "Build With FFMPEG") -set(WITH_FFTW FALSE CACHE BOOL "Build With FFTW") -set(WITH_LIBSNDFILE ${WITH_CODEC_SNDFILE} CACHE BOOL "Build With LibSndFile") -set(SEPARATE_C FALSE CACHE BOOL "Build C Binding as separate library") -set(PLUGIN_FFMPEG FALSE CACHE BOOL "Build FFMPEG Plugin") -set(PLUGIN_JACK FALSE CACHE BOOL "Build JACK Plugin") -set(PLUGIN_LIBSNDFILE FALSE CACHE BOOL "Build LibSndFile Plugin") -set(PLUGIN_OPENAL FALSE CACHE BOOL "Build OpenAL Plugin") -set(PLUGIN_SDL FALSE CACHE BOOL "Build SDL Plugin") -set(WITH_PYTHON_MODULE FALSE CACHE BOOL "Build Python Module") -set(DYNLOAD_JACK ${WITH_JACK_DYNLOAD} CACHE BOOL "Dynamically load JACK") -set(WITH_BINDING_DOCS FALSE CACHE BOOL "Build C/Python HTML Documentation with Sphinx") +set(BUILD_DEMOS FALSE) # "Build and install demos" +set(SHARED_LIBRARY FALSE) # "Build Shared Library" +set(WITH_C TRUE) # "Build C Module" +set(WITH_DOCS FALSE) # "Build C++ HTML Documentation with Doxygen" +set(WITH_FFMPEG ${WITH_CODEC_FFMPEG}) # "Build With FFMPEG" +set(WITH_FFTW FALSE) # "Build With FFTW" +set(WITH_LIBSNDFILE ${WITH_CODEC_SNDFILE}) # "Build With LibSndFile" +set(SEPARATE_C FALSE) # "Build C Binding as separate library" +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_SDL FALSE) # "Build SDL Plugin" +set(WITH_PYTHON_MODULE FALSE) # "Build Python Module" +set(DYNLOAD_JACK ${WITH_JACK_DYNLOAD}) # "Dynamically load JACK" +set(WITH_BINDING_DOCS FALSE) # "Build C/Python HTML Documentation with Sphinx" set(FFMPEG_FOUND ${WITH_CODEC_FFMPEG}) set(JACK_FOUND ${WITH_JACK}) set(LIBSNDFILE_FOUND ${WITH_CODEC_SNDFILE}) @@ -25,7 +28,5 @@ set(NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_INCLUDE_DIRS}) set(SDL_FOUND ${WITH_SDL}) if(WIN32) - set(DEFAULT_PLUGIN_PATH "plugins" CACHE STRING "Default plugin installation and loading path.") + set(DEFAULT_PLUGIN_PATH "plugins") # "Default plugin installation and loading path." endif() - -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) ```

This issue was referenced by c56133c846

This issue was referenced by c56133c84686048d278009d22e0a53ffd6b35be7
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#64480
No description provided.