Skip to content

Commit c8a196a

Browse files
committed
[build-script] never expand install prefix as relative path
1 parent a98068f commit c8a196a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

utils/build-script-impl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,11 @@ function get_host_install_prefix() {
919919
local host_install_prefix="${INSTALL_PREFIX}"
920920
fi
921921

922+
# Should always begin with a '/'; otherwise CMake will expand it as a relative path from the build folder.
923+
if [[ "${host_install_prefix:0:1}" != "/" ]]; then
924+
host_install_prefix="/${host_install_prefix}"
925+
fi
926+
922927
echo "${host_install_prefix}/" # Should always end in a '/'; it's a directory.
923928
}
924929

0 commit comments

Comments
 (0)