summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake
diff options
context:
space:
mode:
authorDennis Klein <d.klein@gsi.de>2019-06-13 14:40:01 (GMT)
committerDennis Klein <d.klein@gsi.de>2019-06-13 14:41:11 (GMT)
commit4caefbb42369cf652df920edd07ee9e81eb95577 (patch)
tree4ebb103777b4c69889c25c3c55f7ee3ad571a9c6 /Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake
parent749ce48eb5b2876b347115a857839fdf9c24a221 (diff)
downloadCMake-4caefbb42369cf652df920edd07ee9e81eb95577.zip
CMake-4caefbb42369cf652df920edd07ee9e81eb95577.tar.gz
CMake-4caefbb42369cf652df920edd07ee9e81eb95577.tar.bz2
cmInstallTargetGenerator: Add tests for the RPATH_CHANGE rule
Diffstat (limited to 'Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake')
-rw-r--r--Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake
new file mode 100644
index 0000000..43ae787
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake
@@ -0,0 +1,18 @@
+cmake_minimum_required(VERSION 3.14)
+enable_language(C)
+
+add_library(utils SHARED obj1.c)
+
+# exe1: absolute build RPATH, no cmake syntax
+set(CMAKE_BUILD_RPATH_USE_ORIGIN OFF)
+set(CMAKE_INSTALL_RPATH "/foo/bar")
+add_executable(exe1 main.c)
+target_link_libraries(exe1 PRIVATE utils)
+
+# exe2: relative build RPATH, no cmake syntax
+set(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
+set(CMAKE_INSTALL_RPATH "/foo/bar")
+add_executable(exe2 main.c)
+target_link_libraries(exe2 PRIVATE utils)
+
+install(TARGETS utils exe1 exe2)