
This makes binaries independent of the build directory by not embedding the build directory via RPATH. The tests are partially based on the existing RuntimePath test, but with the check moved into a POST_BUILD command such that it can be skipped when the platform lacks support. Fixes: #18413
5 lines
161 B
CMake
5 lines
161 B
CMake
file(RPATH_CHECK FILE "${file}" RPATH "${rpath}")
|
|
if(NOT EXISTS "${file}")
|
|
message(FATAL_ERROR "RPATH for ${file} did not contain the expected value")
|
|
endif()
|