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
This commit is contained in:
2022-05-20 11:17:34 +10:00
parent c1dcc64750
commit 42a6c226d0
4 changed files with 69 additions and 18 deletions

View File

@@ -238,7 +238,7 @@ void BPY_context_set(bContext *C)
extern PyObject *Manta_initPython(void);
#endif
#ifdef WITH_AUDASPACE
#ifdef WITH_AUDASPACE_PY
/* defined in AUD_C-API.cpp */
extern PyObject *AUD_initPython(void);
#endif
@@ -272,7 +272,7 @@ static struct _inittab bpy_internal_modules[] = {
#ifdef WITH_FLUID
{"manta", Manta_initPython},
#endif
#ifdef WITH_AUDASPACE
#ifdef WITH_AUDASPACE_PY
{"aud", AUD_initPython},
#endif
#ifdef WITH_CYCLES