diff --git a/deps/obs-scripting/obs-scripting-python-import.c b/deps/obs-scripting/obs-scripting-python-import.c index 5a6068179..c8f74efb5 100644 --- a/deps/obs-scripting/obs-scripting-python-import.c +++ b/deps/obs-scripting/obs-scripting-python-import.c @@ -32,6 +32,12 @@ #define SO_EXT ".dylib" #endif +#ifdef __APPLE__ +#define PYTHON_LIB_SUBDIR "lib/" +#else +#define PYTHON_LIB_SUBDIR "" +#endif + bool import_python(const char *python_path) { struct dstr lib_path; @@ -44,7 +50,7 @@ bool import_python(const char *python_path) dstr_init_copy(&lib_path, python_path); dstr_replace(&lib_path, "\\", "/"); if (!dstr_is_empty(&lib_path)) { - dstr_cat(&lib_path, "/"); + dstr_cat(&lib_path, "/" PYTHON_LIB_SUBDIR); } dstr_cat(&lib_path, PYTHON_LIB SO_EXT);