Skip to content

Commit 585e32c

Browse files
committed
jp: fix linking on macOS
1 parent 91b067c commit 585e32c

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

SConstruct

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ env = Environment(
166166
tools=["default", "cython", "compilation_db", "rednose_filter"],
167167
toolpath=["#site_scons/site_tools", "#rednose_repo/site_scons/site_tools"],
168168
)
169+
# SCons doesn't emit RPATH entries on Darwin, so add the equivalent linker flag
170+
# explicitly for vendored shared libraries that use @rpath install names.
171+
if arch == "Darwin" and ffmpeg_shared:
172+
env.Append(LINKFLAGS=[f"-Wl,-rpath,{ffmpeg.LIB_DIR}"])
169173
if arch != "larch64":
170174
env['_LIBFLAGS'] = _libflags
171175

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import subprocess
2+
from pathlib import Path
3+
4+
5+
JOTPLUGGLER_DIR = Path(__file__).parent
6+
7+
8+
def test_help():
9+
result = subprocess.run(["./jotpluggler", "-h"], cwd=JOTPLUGGLER_DIR, capture_output=True, text=True)
10+
assert result.returncode == 0, result.stderr
11+
assert "Usage:" in result.stderr

0 commit comments

Comments
 (0)