From fe45ac88f4212b22af71b6c0626d92f0009af72a Mon Sep 17 00:00:00 2001 From: Paul Molodowitch Date: Wed, 29 Jan 2020 16:17:21 -0800 Subject: [PATCH] linux/rpath: fix relative path finding for symlinked dirs --- cmake/utils.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index 31fafd9a8a..376ee22a63 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -83,8 +83,10 @@ function(mayaUsd_init_rpath rpathRef origin) else() set(origin "${CMAKE_INSTALL_PREFIX}/${origin}") endif() - get_filename_component(origin "${origin}" REALPATH) endif() + # mayaUsd_add_rpath uses REALPATH, so we must make sure we always + # do so here too, to get the right relative path + get_filename_component(origin "${origin}" REALPATH) set(${rpathRef} "${origin}" PARENT_SCOPE) endfunction()