summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath-check.cmake
blob: 814f405a9e96d71fbc5f3d1f3cc6e7f0aafcb030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
include(${RunCMake_SOURCE_DIR}/TARGETS-FILE_RPATH_CHANGE-check-common.cmake)
skip_without_rpath_change_rule()
string(APPEND prefix "${wsnl}" [[FILE "[^"]*/]])

set(target "exe1")
string(CONCAT regex "${prefix}${target}\"${wsnl}"
              [[OLD_RPATH "]] "${RunCMake_BINARY_DIR}")
check()

if("x${CMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN}" STREQUAL "x\$ORIGIN")
  set(target "exe2")
  string(CONCAT regex "${prefix}${target}\"${wsnl}"
                [[OLD_RPATH "\\\$ORIGIN]])
  check()
endif()