obs-scripting: Fix swig runtime header generation for macOS
Due to swig using a hardcoded swig library path in self-compiled variants, we need to pass our custom swig library path with every invocation of swig on macOS. CMake's `add_custom_command` function does _not_ inherit the environment variables used during configuration, hence why it needs to be passed explicitly on invocation. Usage of CMake's "-E env" command module should allow for cross-platform compatible invocation.master
parent
5898df70fa
commit
64efcd155d
|
@ -95,7 +95,8 @@ if(TARGET Luajit::Luajit)
|
|||
OUTPUT swig/swigluarun.h
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
PRE_BUILD
|
||||
COMMAND ${SWIG_EXECUTABLE} -lua -external-runtime swig/swigluarun.h
|
||||
COMMAND ${CMAKE_COMMAND} -E env "SWIG_LIB=${SWIG_DIR}" ${SWIG_EXECUTABLE}
|
||||
-lua -external-runtime swig/swigluarun.h
|
||||
COMMENT "obs-scripting - generating Luajit SWIG interface headers")
|
||||
|
||||
set_source_files_properties(swig/swigluarun.h PROPERTIES GENERATED ON)
|
||||
|
@ -124,7 +125,8 @@ if(TARGET Python::Python)
|
|||
OUTPUT swig/swigpyrun.h
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
PRE_BUILD
|
||||
COMMAND ${SWIG_EXECUTABLE} -python -external-runtime swig/swigpyrun.h
|
||||
COMMAND ${CMAKE_COMMAND} -E env "SWIG_LIB=${SWIG_DIR}" ${SWIG_EXECUTABLE}
|
||||
-python -external-runtime swig/swigpyrun.h
|
||||
COMMENT "obs-scripting - generating Python 3 SWIG interface headers")
|
||||
|
||||
set_source_files_properties(swig/swigpyrun.h PROPERTIES GENERATED ON)
|
||||
|
|
Loading…
Reference in New Issue