From e27f90fa5affc23fb6ade14bdc561e4a473d29cc Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Wed, 13 Jul 2022 20:26:07 +0200 Subject: [PATCH] obs-scripting: Fix crashes introduced by Swig update to 4.1.0 Fixes issues introduced by https://github.com/swig/swig/pull/2238. As obs-scripting is not compatible with the SWIGPYTHON_BUILTIN, obspython needs to disable this feature. --- deps/obs-scripting/obspython/CMakeLists.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/deps/obs-scripting/obspython/CMakeLists.txt b/deps/obs-scripting/obspython/CMakeLists.txt index c11a5feb4..046e521b1 100644 --- a/deps/obs-scripting/obspython/CMakeLists.txt +++ b/deps/obs-scripting/obspython/CMakeLists.txt @@ -21,8 +21,7 @@ endif() include(UseSWIG) set_source_files_properties( - obspython.i PROPERTIES USE_TARGET_INCLUDE_DIRECTORIES TRUE SWIG_FLAGS - "-builtin;-py3") + obspython.i PROPERTIES USE_TARGET_INCLUDE_DIRECTORIES TRUE SWIG_FLAGS "-py3") swig_add_library( obspython @@ -53,11 +52,8 @@ set_target_properties(obspython PROPERTIES SWIG_COMPILE_DEFINITIONS if(OS_WINDOWS) set_target_properties( - obspython - PROPERTIES - SWIG_COMPILE_DEFINITIONS - "SWIG_TYPE_TABLE=obspython;Py_ENABLE_SHARED=1;SWIG_PYTHON_INTERPRETER_NO_DEBUG;MS_NO_COREDLL" - ) + obspython PROPERTIES SWIG_COMPILE_DEFINITIONS + "${_SWIG_DEFINITIONS};MS_NO_COREDLL") target_link_libraries(obspython PRIVATE Python::Python)