Permalink
Browse files

Python: Add runtime library search path

  • Loading branch information...
AntyMew authored and endrift committed Apr 6, 2018
1 parent e97b4b4 commit 5118247ac49ca8ff2e4430c614d462eb61385b04
Showing with 3 additions and 0 deletions.
  1. +2 −0 src/platform/python/_builder.py
  2. +1 −0 src/platform/python/setup.py.in
@@ -9,6 +9,7 @@
srcdir = os.path.join(pydir, "..", "..")
incdir = os.path.join(pydir, "..", "..", "..", "include")
bindir = os.environ.get("BINDIR", os.path.join(os.getcwd(), ".."))
+libdir = os.environ.get("LIBDIR")
cpp = shlex.split(os.environ.get("CPP", "cc -E"))
cppflags = shlex.split(os.environ.get("CPPFLAGS", ""))
@@ -52,6 +53,7 @@
extra_compile_args=cppflags,
libraries=["mgba"],
library_dirs=[bindir],
+ runtime_library_dirs=[libdir],
sources=[os.path.join(pydir, path) for path in ["vfs-py.c", "core.c", "log.c", "sio.c"]])
preprocessed = subprocess.check_output(cpp + ["-fno-inline", "-P"] + cppflags + [os.path.join(pydir, "_builder.h")], universal_newlines=True)
@@ -4,6 +4,7 @@ import os
import sys
os.environ["BINDIR"] = "${CMAKE_BINARY_DIR}"
+os.environ["LIBDIR"] = "${CMAKE_INSTALL_PREFIX}/${LIBDIR}"
os.environ["CPPFLAGS"] = " ".join([d for d in "${INCLUDE_FLAGS}".split(";") if d])
classifiers = [

0 comments on commit 5118247

Please sign in to comment.