Subject: [PATCH 1/2] Unspecified package is created because bar.h has no COMPONENT.

From: Stephen Kelly <[email-masked]>
Date: Mon, 20 Jun 2011 18:22:01 +0200

---
 buildsystem/HowToInstallALibrary/CMakeLists.txt    |   15 ++++++++++++++-
 .../HowToInstallALibrary/src/CMakeLists.txt        |    6 +++---
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/buildsystem/HowToInstallALibrary/CMakeLists.txt b/buildsystem/HowToInstallALibrary/CMakeLists.txt
index 439797d..0a24d31 100644
--- a/buildsystem/HowToInstallALibrary/CMakeLists.txt
+++ b/buildsystem/HowToInstallALibrary/CMakeLists.txt
@@ -48,6 +48,19 @@ configure_file(BarConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/BarConfigVe
 
 # Install these two files into the same directory as the generated exports-file.
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/BarConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/BarConfigVersion.cmake
-        DESTINATION ${CMAKECONFIG_INSTALL_DIR} )
+        DESTINATION ${CMAKECONFIG_INSTALL_DIR}
+        COMPONENT Common
+ )
+
+SET(CPACK_PACKAGE_NAME "bar")
+SET(CPACK_PACKAGE_VERSION_MAJOR ${BAR_VERSION_MAJOR})
+SET(CPACK_PACKAGE_VERSION_MINOR ${BAR_VERSION_MINOR})
+SET(CPACK_PACKAGE_VERSION_PATCH ${BAR_VERSION_PATCH})
+SET(CPACK_PACKAGE_CONTACT "Konqi <[email-masked]>")
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A library for use with Qt")
+SET(CPACK_GENERATOR "TGZ" )
+SET(CPACK_ARCHIVE_COMPONENT_INSTALL 1)
+include(CPack)
+

diff --git a/buildsystem/HowToInstallALibrary/src/CMakeLists.txt b/buildsystem/HowToInstallALibrary/src/CMakeLists.txt
index 451b6c8..5373e24 100644
--- a/buildsystem/HowToInstallALibrary/src/CMakeLists.txt
+++ b/buildsystem/HowToInstallALibrary/src/CMakeLists.txt
@@ -17,6 +17,6 @@ install(FILES bar.h DESTINATION ${INCLUDE_INSTALL_DIR} )
 # The three different destinations are mostly interesting for Windows:
 # the dll must go into bin/ (needed at RUNTIME), while the lib-file should go into lib/
 # The ARCHIVE DESTINATION is only for completeness here, it is only used for static libraries.
-install(TARGETS bar EXPORT BarExport LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-                                     ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-                                     RUNTIME DESTINATION ${BIN_INSTALL_DIR} )
+install(TARGETS bar EXPORT BarExport LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT Devel
+                                     ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT Devel
+                                     RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT Devel)
-- 
1.7.4.1