obs-scripting: Switch swig to stable ABI usage

master
PatTheMav 2022-07-13 20:30:59 +02:00 committed by Ryan Foster
parent 4afc2c8e6f
commit 47b3ff5e64
2 changed files with 7 additions and 3 deletions

View File

@ -125,8 +125,10 @@ if(TARGET Python::Python)
OUTPUT swig/swigpyrun.h
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E env "SWIG_LIB=${SWIG_DIR}" ${SWIG_EXECUTABLE}
-python -external-runtime swig/swigpyrun.h
COMMAND
${CMAKE_COMMAND} -E env "SWIG_LIB=${SWIG_DIR}" ${SWIG_EXECUTABLE} -python
$<IF:$<BOOL:${OS_LINUX}>,-py3,-py3-stable-abi> -external-runtime
swig/swigpyrun.h
COMMENT "obs-scripting - generating Python 3 SWIG interface headers")
set_source_files_properties(swig/swigpyrun.h PROPERTIES GENERATED ON)

View File

@ -21,7 +21,9 @@ endif()
include(UseSWIG)
set_source_files_properties(
obspython.i PROPERTIES USE_TARGET_INCLUDE_DIRECTORIES TRUE SWIG_FLAGS "-py3")
obspython.i
PROPERTIES USE_TARGET_INCLUDE_DIRECTORIES TRUE
SWIG_FLAGS "$<IF:$<BOOL:${OS_LINUX}>,-py3,-py3-stable-abi>")
swig_add_library(
obspython