Skip to content

Commit 67f1b06

Browse files
committed
install_glimpse: fix install_plugin target on Linux
1 parent 25a4b87 commit 67f1b06

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

install_glimpse.py

+13-12
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,13 @@ def install_unity_plugin__linux(dst, unity_project):
9898
print(" ".join(ln_cmd))
9999
subprocess.check_call(ln_cmd)
100100

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)
107108

108109
elif target['type'] == 'static library' and target['name'] in static_libs_whitelist:
109110
basename = os.path.basename(target['filename'])
@@ -162,14 +163,14 @@ def install_unity_plugin__osx(dst, unity_project):
162163
# build directory but the libraries will all be in the same Assets/
163164
# Plugins/ directory so, as for Linux we want an rpath that will
164165
# 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)
168169

169170
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)
173174

174175
elif target['type'] == 'static library' and target['name'] in static_libs_whitelist:
175176
basename = os.path.basename(target['filename'])

0 commit comments

Comments
 (0)