summaryrefslogtreecommitdiffstats
path: root/Tests/CPackComponentsPrefix
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2015-03-26 04:36:38 (GMT)
committerBrad King <brad.king@kitware.com>2015-03-30 13:22:14 (GMT)
commite3f84fc504e96d1bdbc9c70434135903c449bdd1 (patch)
treed84713c563e0e876d6097d5b2c09a9d9429b7718 /Tests/CPackComponentsPrefix
parent51b4321e5fdf9f7cbc54881037a45a474883ef47 (diff)
downloadCMake-e3f84fc504e96d1bdbc9c70434135903c449bdd1.zip
CMake-e3f84fc504e96d1bdbc9c70434135903c449bdd1.tar.gz
CMake-e3f84fc504e96d1bdbc9c70434135903c449bdd1.tar.bz2
cpack: Fix CPACK_PACKAGING_INSTALL_PREFIX handling for archives (#14677)
Fix the case when the archive generator is used to package components with an install prefix.
Diffstat (limited to 'Tests/CPackComponentsPrefix')
-rw-r--r--Tests/CPackComponentsPrefix/CMakeLists.txt13
-rw-r--r--Tests/CPackComponentsPrefix/file-development.txt1
-rw-r--r--Tests/CPackComponentsPrefix/file-runtime.txt1
3 files changed, 15 insertions, 0 deletions
diff --git a/Tests/CPackComponentsPrefix/CMakeLists.txt b/Tests/CPackComponentsPrefix/CMakeLists.txt
new file mode 100644
index 0000000..207dae8
--- /dev/null
+++ b/Tests/CPackComponentsPrefix/CMakeLists.txt
@@ -0,0 +1,13 @@
+cmake_minimum_required(VERSION 3.2)
+project(CPackComponentsPrefix NONE)
+
+install(FILES file-runtime.txt
+ DESTINATION bin COMPONENT Runtime)
+install(FILES file-development.txt
+ DESTINATION lib COMPONENT Development)
+
+set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 1)
+set(CPACK_COMPONENTS_ALL Development)
+set(CPACK_ARCHIVE_COMPONENT_INSTALL 1)
+set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/My-1.0")
+include(CPack)
diff --git a/Tests/CPackComponentsPrefix/file-development.txt b/Tests/CPackComponentsPrefix/file-development.txt
new file mode 100644
index 0000000..df22d2f
--- /dev/null
+++ b/Tests/CPackComponentsPrefix/file-development.txt
@@ -0,0 +1 @@
+This file is installed with the Development component.
diff --git a/Tests/CPackComponentsPrefix/file-runtime.txt b/Tests/CPackComponentsPrefix/file-runtime.txt
new file mode 100644
index 0000000..135c13d
--- /dev/null
+++ b/Tests/CPackComponentsPrefix/file-runtime.txt
@@ -0,0 +1 @@
+This file is installed with the Runtime component.