[CMake] Make CMAKE_INSTALL_RPATH work again

r285714 made it so that when CMAKE_INSTALL_RPATH is set _install_rpath is not
set, but that means INSTALL_RPATH gets set to an empty string which isn't what
we want. Fix this by setting INSTALL_RPATH only when _install_rpath is set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285908 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
John Brawn 2016-11-03 13:55:04 +00:00
parent 77e7778b3e
commit a0e0673b0f

View File

@ -1351,8 +1351,10 @@ function(llvm_setup_rpath name)
return()
endif()
set_target_properties(${name} PROPERTIES
BUILD_WITH_INSTALL_RPATH On
INSTALL_RPATH "${_install_rpath}"
${_install_name_dir})
if(DEFINED _install_rpath)
set_target_properties(${name} PROPERTIES
BUILD_WITH_INSTALL_RPATH On
INSTALL_RPATH "${_install_rpath}"
${_install_name_dir})
endif()
endfunction()