Skip to content

Commit

Permalink
use @loader_path instead
Browse files Browse the repository at this point in the history
  • Loading branch information
bongbui321 committed Jul 5, 2024
1 parent a940a17 commit c015912
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions can/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ src = ["dbc.cc", "parser.cc", "packer.cc", "common.cc"]
libs = [common, "capnp", "kj", "zmq"]

# shared library for openpilot
LINKFLAGS = envDBC["LINKFLAGS"] + ["-Wl,-install_name,@rpath/libdbc.dylib"] if arch == "Darwin" else envDBC["LINKFLAGS"]
LINKFLAGS = envDBC["LINKFLAGS"] + ["-Wl,-install_name,@loader_path/libdbc.dylib"] if arch == "Darwin" else envDBC["LINKFLAGS"]
libdbc = envDBC.SharedLibrary('libdbc', src, LIBS=libs, LINKFLAGS=LINKFLAGS)

# static library for tools like cabana
Expand All @@ -18,8 +18,6 @@ envDBC.Library('libdbc_static', src, LIBS=libs)
# Build packer and parser
lenv = envCython.Clone()
lenv["LINKFLAGS"] += [libdbc[0].get_labspath()]
if arch == "Darwin":
lenv["LINKFLAGS"] += [f'-Wl,-rpath,{File(libdbc[0]).dir.abspath}']
parser = lenv.Program('parser_pyx.so', 'parser_pyx.pyx')
packer = lenv.Program('packer_pyx.so', 'packer_pyx.pyx')

Expand Down

0 comments on commit c015912

Please sign in to comment.