Skip to content

Commit

Permalink
fix issue with -install_name and -soname link flags when project targ…
Browse files Browse the repository at this point in the history
…et contains subfolders
  • Loading branch information
gatgui committed Aug 15, 2015
1 parent bf1ac2f commit 1e3df13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,11 +752,14 @@ def add_deps(tgt):
pout = penv.SharedLibrary(os.path.join(out_dir, mode_dir, "lib", prj), objs)
else:
pout = penv.SharedLibrary(os.path.join(out_dir, mode_dir, arch_dir, "lib", prj), objs)
dn, bn = os.path.split(prj)
if dn:
dn += "/"
if sys.platform == "darwin":
penv.Append(LINKFLAGS=" -Wl,-install_name,@rpath/lib%s.dylib" % prj)
penv.Append(LINKFLAGS=" -Wl,-install_name,@rpath/%slib%s.dylib" % (dn, bn))
#penv.AddPostAction(pout, "install_name_tool -id @rpath/lib%s.dylib $TARGETS" % os.path.basename(prj))
else:
penv.Append(LINKFLAGS=" -Wl,-soname,lib%s.so" % prj)
penv.Append(LINKFLAGS=" -Wl,-soname,lib%s.so" % bn)
add_deps(pout)

elif settings["type"] == "program":
Expand Down

0 comments on commit 1e3df13

Please sign in to comment.