Skip to content

Commit 5d0cdbc

Browse files
committed
On Darwin support custom install-id for the library.
Add DARWIN_INSTALL_NAME construction variable which can be set to something else than the default absolute path.
1 parent 8150a80 commit 5d0cdbc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/SConscript

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,12 @@ Alias('lib', libobjcryst)
8383
prefix = env['prefix']
8484

8585
# install-lib
86-
libinstall = Install(env['libdir'], libobjcryst)
86+
libinstall = env.Install(env['libdir'], libobjcryst)
8787
if env['PLATFORM'] == 'darwin':
88+
# DARWIN_INSTALL_NAME can be pre-set in sconscript.local
89+
env.SetDefault(DARWIN_INSTALL_NAME='$TARGET.abspath')
8890
env.AddPostAction(libinstall,
89-
'install_name_tool -id $TARGET.abspath $TARGET')
91+
'install_name_tool -id $DARWIN_INSTALL_NAME $TARGET')
9092
if env['PLATFORM'] == 'posix' and WhereIs('ldconfig'):
9193
opts = ''
9294
if os.getuid() != 0: opts = '-n'

0 commit comments

Comments
 (0)