@@ -98,12 +98,13 @@ def install_unity_plugin__linux(dst, unity_project):
98
98
print (" " .join (ln_cmd ))
99
99
subprocess .check_call (ln_cmd )
100
100
101
- # To avoid needing to set LD_LIBRARY_PATH for the plugin to load
102
- # its dependencies we update the RPATH to look in the same
103
- # directory as the plugin itself...
104
- chrpath_cmd = ['chrpath' , '-r' , '$ORIGIN' , dst_filename ]
105
- print (" " .join (chrpath_cmd ))
106
- subprocess .check_call (chrpath_cmd )
101
+ if target ['name' ] == "glimpse-unity-plugin" :
102
+ # To avoid needing to set LD_LIBRARY_PATH for the plugin to load
103
+ # its dependencies we update the RPATH to look in the same
104
+ # directory as the plugin itself...
105
+ chrpath_cmd = ['chrpath' , '-k' , '-r' , '$ORIGIN' , dst_filename ]
106
+ print (" " .join (chrpath_cmd ))
107
+ subprocess .check_call (chrpath_cmd )
107
108
108
109
elif target ['type' ] == 'static library' and target ['name' ] in static_libs_whitelist :
109
110
basename = os .path .basename (target ['filename' ])
@@ -162,14 +163,14 @@ def install_unity_plugin__osx(dst, unity_project):
162
163
# build directory but the libraries will all be in the same Assets/
163
164
# Plugins/ directory so, as for Linux we want an rpath that will
164
165
# check for dependencies adjacent to the plugin...
165
- chrpath_cmd = [ 'install_name_tool' , '-add_rpath' , '@loader_path' , dst_filename ]
166
- print (" " .join (chrpath_cmd ))
167
- subprocess .check_call (chrpath_cmd )
166
+ add_rpath_cmd = [ 'install_name_tool' , '-add_rpath' , '@loader_path' , dst_filename ]
167
+ print (" " .join (add_rpath_cmd ))
168
+ subprocess .check_call (add_rpath_cmd )
168
169
169
170
if new_id :
170
- chrpath_cmd = [ 'install_name_tool' , '-id' , new_id , dst_filename ]
171
- print (" " .join (chrpath_cmd ))
172
- subprocess .check_call (chrpath_cmd )
171
+ new_id_cmd = [ 'install_name_tool' , '-id' , new_id , dst_filename ]
172
+ print (" " .join (new_id_cmd ))
173
+ subprocess .check_call (new_id_cmd )
173
174
174
175
elif target ['type' ] == 'static library' and target ['name' ] in static_libs_whitelist :
175
176
basename = os .path .basename (target ['filename' ])
0 commit comments