diff options
| author | Josh Blum <josh@joshknows.com> | 2011-03-21 16:40:21 -0700 | 
|---|---|---|
| committer | Josh Blum <josh@joshknows.com> | 2011-03-21 16:40:21 -0700 | 
| commit | a963caab9b6500ecef015fa5c514f2a7ae23046f (patch) | |
| tree | bd9bb3dbc1bc1cf8b603b08228810dcb81b68262 | |
| parent | 3938de0cfedb4c4ca8b5fdb1ed7137ee32208648 (diff) | |
| download | uhd-a963caab9b6500ecef015fa5c514f2a7ae23046f.tar.gz uhd-a963caab9b6500ecef015fa5c514f2a7ae23046f.tar.bz2 uhd-a963caab9b6500ecef015fa5c514f2a7ae23046f.zip | |
uhd: setup cpack components for component based installers
| -rw-r--r-- | host/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | host/Modules/UHDPackage.cmake | 37 | ||||
| -rw-r--r-- | host/docs/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | host/examples/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | host/include/uhd/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | host/include/uhd/transport/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | host/include/uhd/types/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | host/include/uhd/usrp/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | host/include/uhd/utils/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | host/lib/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | host/tests/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | host/utils/CMakeLists.txt | 5 | 
12 files changed, 54 insertions, 14 deletions
| diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index bbcf34373..590f1b138 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -156,6 +156,7 @@ CONFIGURE_FILE(  INSTALL(      FILES ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc      DESTINATION ${LIBRARY_DIR}/pkgconfig +    COMPONENT libraries  )  ######################################################################## @@ -166,6 +167,7 @@ INSTALL(FILES      ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE      ${CMAKE_CURRENT_SOURCE_DIR}/AUTHORS      DESTINATION ${PKG_DOC_DIR} +    COMPONENT libraries  )  ######################################################################## diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 2a11d407b..ed705148a 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -19,7 +19,7 @@  INCLUDE(UHDVersion) #sets version information  ######################################################################## -# Setup CPack +# Setup CPack General  ########################################################################  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ettus Research - Universal Hardware Driver")  SET(CPACK_PACKAGE_VENDOR              "Ettus Research LLC") @@ -29,6 +29,35 @@ SET(CPACK_PACKAGE_VERSION_MINOR ${UHD_VERSION_MINOR})  SET(CPACK_PACKAGE_VERSION_PATCH ${UHD_VERSION_PATCH})  SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README)  SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE) + +######################################################################## +# Setup CPack Components +######################################################################## +SET(CPACK_COMPONENT_LIBRARIES_GROUP      "Development") +SET(CPACK_COMPONENT_HEADERS_GROUP        "Development") +SET(CPACK_COMPONENT_UTILITIES_GROUP      "Runtime") +SET(CPACK_COMPONENT_EXAMPLES_GROUP       "Runtime") +SET(CPACK_COMPONENT_TESTS_GROUP          "Runtime") +SET(CPACK_COMPONENT_MANUAL_GROUP         "Documentation") +SET(CPACK_COMPONENT_DOXYGEN_GROUP        "Documentation") + +SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME      "Libraries") +SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME        "C++ Headers") +SET(CPACK_COMPONENT_UTILITIES_DISPLAY_NAME      "Utilities") +SET(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME       "Examples") +SET(CPACK_COMPONENT_TESTS_DISPLAY_NAME          "Unit Tests") +SET(CPACK_COMPONENT_MANUAL_DISPLAY_NAME         "Manual") +SET(CPACK_COMPONENT_DOXYGEN_DISPLAY_NAME        "Doxygen") + +SET(CPACK_COMPONENT_UTILITIES_DEPENDS libraries) +SET(CPACK_COMPONENT_EXAMPLES_DEPENDS libraries) +SET(CPACK_COMPONENT_TESTS_DEPENDS libraries) + +SET(CPACK_COMPONENTS_ALL libraries headers utilities examples tests manual doxygen) + +######################################################################## +# Setup CPack Debian +########################################################################  SET(BOOST_MIN_VERSION 1.36) #used in setup for boost  STRING(REPLACE "," ", " CPACK_DEBIAN_PACKAGE_DEPENDS      "libboost-date-time-dev          (>= ${BOOST_MIN_VERSION})," @@ -40,5 +69,11 @@ STRING(REPLACE "," ", " CPACK_DEBIAN_PACKAGE_DEPENDS      "libboost-thread-dev             (>= ${BOOST_MIN_VERSION})"  )  SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python, python-tk") + +######################################################################## +# Setup CPack RPM +########################################################################  SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel >= ${BOOST_MIN_VERSION}") + +########################################################################  INCLUDE(CPack) #include after setting vars diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt index c04262b63..1a2738647 100644 --- a/host/docs/CMakeLists.txt +++ b/host/docs/CMakeLists.txt @@ -64,14 +64,14 @@ IF(ENABLE_MANUAL)          #make the manual target depend on the html file          LIST(APPEND manual_html_files ${htmlfile}) -        INSTALL(FILES ${htmlfile} DESTINATION ${PKG_DOC_DIR}/manual/html) +        INSTALL(FILES ${htmlfile} DESTINATION ${PKG_DOC_DIR}/manual/html COMPONENT manual)      ENDFOREACH(rstfile ${manual_sources})      #make the html manual a build-time dependency      ADD_CUSTOM_TARGET(manual_html ALL DEPENDS ${manual_html_files})  ENDIF(ENABLE_MANUAL) -INSTALL(FILES ${manual_sources} DESTINATION ${PKG_DOC_DIR}/manual/rst) +INSTALL(FILES ${manual_sources} DESTINATION ${PKG_DOC_DIR}/manual/rst COMPONENT manual)  ########################################################################  # Setup Doxygen @@ -99,5 +99,5 @@ IF(ENABLE_DOXYGEN)      #make the doxygen generation a built-time dependency      ADD_CUSTOM_TARGET(doxygen_docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN}) -    INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR}) +    INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR} COMPONENT doxygen)  ENDIF(ENABLE_DOXYGEN) diff --git a/host/examples/CMakeLists.txt b/host/examples/CMakeLists.txt index 44ed55380..1bb037d16 100644 --- a/host/examples/CMakeLists.txt +++ b/host/examples/CMakeLists.txt @@ -37,7 +37,7 @@ FOREACH(example_source ${example_sources})      GET_FILENAME_COMPONENT(example_name ${example_source} NAME_WE)      ADD_EXECUTABLE(${example_name} ${example_source})      TARGET_LINK_LIBRARIES(${example_name} uhd) -    INSTALL(TARGETS ${example_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/examples) +    INSTALL(TARGETS ${example_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/examples COMPONENT examples)  ENDFOREACH(example_source)  ######################################################################## @@ -49,5 +49,5 @@ IF(CURSES_FOUND)      INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR})      ADD_EXECUTABLE(rx_ascii_art_dft rx_ascii_art_dft.cpp)      TARGET_LINK_LIBRARIES(rx_ascii_art_dft uhd ${CURSES_LIBRARIES}) -    INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_DATA_DIR}/examples) +    INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_DATA_DIR}/examples COMPONENT examples)  ENDIF(CURSES_FOUND) diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt index db755511e..74dc4a7d6 100644 --- a/host/include/uhd/CMakeLists.txt +++ b/host/include/uhd/CMakeLists.txt @@ -29,4 +29,5 @@ INSTALL(FILES      version.hpp      wax.hpp      DESTINATION ${INCLUDE_DIR}/uhd +    COMPONENT headers  ) diff --git a/host/include/uhd/transport/CMakeLists.txt b/host/include/uhd/transport/CMakeLists.txt index 14ca82226..bf7497ee7 100644 --- a/host/include/uhd/transport/CMakeLists.txt +++ b/host/include/uhd/transport/CMakeLists.txt @@ -29,4 +29,5 @@ INSTALL(FILES      vrt_if_packet.hpp      zero_copy.hpp      DESTINATION ${INCLUDE_DIR}/uhd/transport +    COMPONENT headers  ) diff --git a/host/include/uhd/types/CMakeLists.txt b/host/include/uhd/types/CMakeLists.txt index c856e5568..0971ca472 100644 --- a/host/include/uhd/types/CMakeLists.txt +++ b/host/include/uhd/types/CMakeLists.txt @@ -34,4 +34,5 @@ INSTALL(FILES      tune_request.hpp      tune_result.hpp      DESTINATION ${INCLUDE_DIR}/uhd/types +    COMPONENT headers  ) diff --git a/host/include/uhd/usrp/CMakeLists.txt b/host/include/uhd/usrp/CMakeLists.txt index 59a1302af..e441433fd 100644 --- a/host/include/uhd/usrp/CMakeLists.txt +++ b/host/include/uhd/usrp/CMakeLists.txt @@ -1,5 +1,5 @@  # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC  #  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU General Public License as published by @@ -46,4 +46,5 @@ INSTALL(FILES      mboard_iface.hpp      DESTINATION ${INCLUDE_DIR}/uhd/usrp +    COMPONENT headers  ) diff --git a/host/include/uhd/utils/CMakeLists.txt b/host/include/uhd/utils/CMakeLists.txt index 70f724c2d..71808ac98 100644 --- a/host/include/uhd/utils/CMakeLists.txt +++ b/host/include/uhd/utils/CMakeLists.txt @@ -31,4 +31,5 @@ INSTALL(FILES      thread_priority.hpp      warning.hpp      DESTINATION ${INCLUDE_DIR}/uhd/utils +    COMPONENT headers  ) diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index dbfa234b6..a30b380c4 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -121,4 +121,5 @@ INSTALL(TARGETS uhd      LIBRARY DESTINATION ${LIBRARY_DIR} # .so file      ARCHIVE DESTINATION ${LIBRARY_DIR} # .lib file      RUNTIME DESTINATION ${LIBRARY_DIR} # .dll file +    COMPONENT libraries  ) diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt index 79b20cd47..821b2eb9e 100644 --- a/host/tests/CMakeLists.txt +++ b/host/tests/CMakeLists.txt @@ -44,7 +44,7 @@ FOREACH(test_source ${test_sources})      ADD_EXECUTABLE(${test_name} ${test_source})      TARGET_LINK_LIBRARIES(${test_name} uhd)      ADD_TEST(${test_name} ${test_name}) -    INSTALL(TARGETS ${test_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/tests) +    INSTALL(TARGETS ${test_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/tests COMPONENT tests)  ENDFOREACH(test_source)  ######################################################################## @@ -52,7 +52,3 @@ ENDFOREACH(test_source)  ########################################################################  ADD_LIBRARY(module_test MODULE module_test.cpp)  TARGET_LINK_LIBRARIES(module_test uhd) - -INSTALL(TARGETS -   RUNTIME DESTINATION ${PKG_DATA_DIR}/tests -) diff --git a/host/utils/CMakeLists.txt b/host/utils/CMakeLists.txt index 53527c03d..3c18324a5 100644 --- a/host/utils/CMakeLists.txt +++ b/host/utils/CMakeLists.txt @@ -28,7 +28,7 @@ FOREACH(util_source ${util_runtime_sources})      GET_FILENAME_COMPONENT(util_name ${util_source} NAME_WE)      ADD_EXECUTABLE(${util_name} ${util_source})      TARGET_LINK_LIBRARIES(${util_name} uhd) -    INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${RUNTIME_DIR}) +    INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)  ENDFOREACH(util_source)  ######################################################################## @@ -50,7 +50,7 @@ FOREACH(util_source ${util_share_sources})      GET_FILENAME_COMPONENT(util_name ${util_source} NAME_WE)      ADD_EXECUTABLE(${util_name} ${util_source})      TARGET_LINK_LIBRARIES(${util_name} uhd) -    INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/utils) +    INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/utils COMPONENT utilities)  ENDFOREACH(util_source)  IF(ENABLE_USRP2) @@ -60,5 +60,6 @@ IF(ENABLE_USRP2)          usrp2_card_burner_gui.py          usrp_n2xx_net_burner.py          DESTINATION ${PKG_DATA_DIR}/utils +        COMPONENT utilities      )  ENDIF(ENABLE_USRP2) | 
