summaryrefslogtreecommitdiffstats
path: root/Tests/CPackComponentsForAll
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2011-01-30 12:11:25 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2011-01-30 12:11:25 (GMT)
commit92ced20fa13cd2b4ed45a80d265a590d2291f8ee (patch)
tree78ab255542bb412764e131b59aa0973eaf9042cf /Tests/CPackComponentsForAll
parent04d4afbfa863bc43ab4d597b0b1a64f9a86c9ba2 (diff)
downloadCMake-92ced20fa13cd2b4ed45a80d265a590d2291f8ee.zip
CMake-92ced20fa13cd2b4ed45a80d265a590d2291f8ee.tar.gz
CMake-92ced20fa13cd2b4ed45a80d265a590d2291f8ee.tar.bz2
CPack Tests the different ways of packaging components
Diffstat (limited to 'Tests/CPackComponentsForAll')
-rw-r--r--Tests/CPackComponentsForAll/CMakeLists.txt12
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in18
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in18
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in18
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in18
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig.cmake.in7
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake12
7 files changed, 90 insertions, 13 deletions
diff --git a/Tests/CPackComponentsForAll/CMakeLists.txt b/Tests/CPackComponentsForAll/CMakeLists.txt
index 971b2dc..bcec509 100644
--- a/Tests/CPackComponentsForAll/CMakeLists.txt
+++ b/Tests/CPackComponentsForAll/CMakeLists.txt
@@ -107,14 +107,14 @@ set(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full)
# We may use the CPack specific config file in order
-# to tailor CPack behavio on a CPack generator specific way
+# to tailor CPack behavior on a CPack generator specific way
# (Behavior would be different for RPM or TGZ or DEB ...)
-if (USE_CPACK_PROJECT_CONFIG)
+if (NOT ("${CPackComponentWay}" STREQUAL "default"))
# Setup project specific CPack-time CPack Config file.
- configure_file(${MyLib_SOURCE_DIR}/MyLibCPackConfig.cmake.in
- ${MyLib_BINARY_DIR}/MyLibCPackConfig.cmake
+ configure_file(${CPackComponentsForAll_SOURCE_DIR}/MyLibCPackConfig-${CPackComponentWay}.cmake.in
+ ${CPackComponentsForAll_BINARY_DIR}/MyLibCPackConfig-${CPackComponentWay}.cmake
@ONLY)
- set(CPACK_PROJECT_CONFIG_FILE ${MyLib_BINARY_DIR}/MyLibCPackConfig.cmake)
-endif (USE_CPACK_PROJECT_CONFIG)
+ set(CPACK_PROJECT_CONFIG_FILE ${CPackComponentsForAll_BINARY_DIR}/MyLibCPackConfig-${CPackComponentWay}.cmake)
+endif (NOT ("${CPackComponentWay}" STREQUAL "default"))
# Include CPack to introduce the appropriate targets
include(CPack) \ No newline at end of file
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in
new file mode 100644
index 0000000..3a7119e
--- /dev/null
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllGroupsInOne.cmake.in
@@ -0,0 +1,18 @@
+#
+# Activate component packaging
+#
+if(CPACK_GENERATOR MATCHES "ZIP")
+ set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "ZIP")
+
+if(CPACK_GENERATOR MATCHES "RPM")
+ set(CPACK_RPM_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "RPM")
+
+#
+# Choose grouping way
+#
+set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE 1)
+#set(CPACK_COMPONENTS_GROUPING)
+#set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
+#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in
new file mode 100644
index 0000000..9a40293
--- /dev/null
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-AllInOne.cmake.in
@@ -0,0 +1,18 @@
+#
+# Activate component packaging
+#
+if(CPACK_GENERATOR MATCHES "ZIP")
+ set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "ZIP")
+
+if(CPACK_GENERATOR MATCHES "RPM")
+ set(CPACK_RPM_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "RPM")
+
+#
+# Choose grouping way
+#
+#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE 1)
+#set(CPACK_COMPONENTS_GROUPING)
+#set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
+set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
new file mode 100644
index 0000000..92a97a5
--- /dev/null
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in
@@ -0,0 +1,18 @@
+#
+# Activate component packaging
+#
+if(CPACK_GENERATOR MATCHES "ZIP")
+ set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "ZIP")
+
+if(CPACK_GENERATOR MATCHES "RPM")
+ set(CPACK_RPM_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "RPM")
+
+#
+# Choose grouping way
+#
+#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE)
+#set(CPACK_COMPONENTS_GROUPING)
+set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
+#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) \ No newline at end of file
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in
new file mode 100644
index 0000000..4180891
--- /dev/null
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in
@@ -0,0 +1,18 @@
+#
+# Activate component packaging
+#
+if(CPACK_GENERATOR MATCHES "ZIP")
+ set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "ZIP")
+
+if(CPACK_GENERATOR MATCHES "RPM")
+ set(CPACK_RPM_COMPONENT_INSTALL "ON")
+endif(CPACK_GENERATOR MATCHES "RPM")
+
+#
+# Choose grouping way
+#
+#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE)
+#set(CPACK_COMPONENTS_GROUPING)
+#set(CPACK_COMPONENTS_IGNORE_GROUPS)
+#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE) \ No newline at end of file
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig.cmake.in
deleted file mode 100644
index 7ffafae..0000000
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig.cmake.in
+++ /dev/null
@@ -1,7 +0,0 @@
-if(CPACK_GENERATOR MATCHES "ZIP")
-# set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
-endif(CPACK_GENERATOR MATCHES "ZIP")
-
-if(CPACK_GENERATOR MATCHES "TGZ")
- set(CPACK_MONOLITHIC_INSTALL 1)
-endif(CPACK_GENERATOR MATCHES "TGZ")
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index 11f72ec..d5137bd 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -49,6 +49,18 @@ if(CPackGen MATCHES "ZIP")
if (${CPackComponentWay} STREQUAL "default")
set(expected_count 1)
endif(${CPackComponentWay} STREQUAL "default")
+ if (${CPackComponentWay} STREQUAL "OnePackPerGroup")
+ set(expected_count 2)
+ endif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
+ if (${CPackComponentWay} STREQUAL "IgnoreGroup")
+ set(expected_count 4)
+ endif (${CPackComponentWay} STREQUAL "IgnoreGroup")
+ if (${CPackComponentWay} STREQUAL "AllInOne")
+ set(expected_count 1)
+ endif (${CPackComponentWay} STREQUAL "AllInOne")
+ if (${CPackComponentWay} STREQUAL "AllGroupsInOne")
+ set(expected_count 1)
+ endif (${CPackComponentWay} STREQUAL "AllGroupsInOne")
endif(CPackGen MATCHES "ZIP")
# Now verify if the number of expected file is OK