This commit is contained in:
Yuhang Zhao 2023-08-01 15:39:16 +08:00
parent d4c8265fa4
commit 68b2bcba14
1 changed files with 2 additions and 2 deletions

View File

@ -1738,13 +1738,13 @@ function(compute_relative_rpath)
compute_install_dir(LIB_DIR __lib_dir)
set(__lib_dir_absolute "${CMAKE_INSTALL_PREFIX}/${__lib_dir}")
set(__rpath_absolute "")
cmake_path(ABSOLUTE_PATH "${arg_RPATH}" BASE_DIRECTORY "${__lib_dir_absolute}" OUTPUT_VARIABLE __rpath_absolute)
cmake_path(ABSOLUTE_PATH arg_RPATH BASE_DIRECTORY __lib_dir_absolute OUTPUT_VARIABLE __rpath_absolute)
set(__install_location_absolute "${arg_INSTALL_LOCATION}")
if(NOT IS_ABSOLUTE "${__install_location_absolute}")
set(__install_location_absolute "${CMAKE_INSTALL_PREFIX}/${arg_INSTALL_LOCATION}")
endif()
set(__rpath_relative "")
cmake_path(RELATIVE_PATH "${__rpath_absolute}" BASE_DIRECTORY "${__install_location_absolute}" OUTPUT_VARIABLE __rpath_relative)
cmake_path(RELATIVE_PATH __rpath_absolute BASE_DIRECTORY __install_location_absolute OUTPUT_VARIABLE __rpath_relative)
if("x${__rpath_relative}" STREQUAL "x")
# We may get an empty string if the given absolute paths are equal.
set(__rpath_relative ".")