浏览代码

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.
PatTheMav 3 年之前
父节点
当前提交
e27f90fa5a
共有 1 个文件被更改,包括 3 次插入7 次删除
  1. 3 7
      deps/obs-scripting/obspython/CMakeLists.txt

+ 3 - 7
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)