How to configure scons to link using rpath on mac?

It works on Ubuntu to link my task using RPATH, but on mac, it doesn’t work

env.Program(source = Glob("*.cpp") + Glob("../*.cpp"),
            LIBS = [
            LIBPATH = libPath,
            RPATH = libPath,
            CPPPATH = includePath)

On Ubuntu, using ldd, I can see shared libs are linked with absolute path. But using otool -L on mac gives me relative path to top dir of my Sconstruct file. Anyone setup RPATH correctly on mac using scons?

Source: gcc

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.