diff --git a/.travis.yml b/.travis.yml index 927730174..343e1eec9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -118,6 +118,10 @@ script: cmake $MY_CMAKE_OPTIONS . && make && make install ); fi + # Check that all installed files are in a component (no "unspecified + # component" archive created) + - (cd build && cpack -G TGZ -D CPACK_ARCHIVE_COMPONENT_INSTALL=ON && + [ ! -a '*-Unspecified.tar.gz' ]) # Keep this last - ( mkdir build_less_features && cd build_less_features && rm -rf $PREFIX/asio-1.10.6 && diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt index c04ac3c9c..f9dd3d0c0 100644 --- a/bindings/c/CMakeLists.txt +++ b/bindings/c/CMakeLists.txt @@ -33,11 +33,15 @@ generate_export_header(cparameter) install(FILES ParameterFramework.h "${CMAKE_CURRENT_BINARY_DIR}/cparameter_export.h" - DESTINATION "include/parameter/c") + DESTINATION "include/parameter/c" + COMPONENT c_dev) target_link_libraries(cparameter PRIVATE parameter pfw_utility) -install(TARGETS cparameter LIBRARY DESTINATION lib RUNTIME DESTINATION bin) +install(TARGETS cparameter + LIBRARY DESTINATION lib COMPONENT c + RUNTIME DESTINATION bin COMPONENT c + ARCHIVE DESTINATION lib COMPONENT c_dev) if(BUILD_TESTING) # Add unit test diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 580763389..bdb6513e0 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -89,7 +89,8 @@ execute_process(COMMAND print(sysconfig.get_python_lib(plat_specific=True, prefix=''))" OUTPUT_VARIABLE PYTHON_MODULE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) -install(TARGETS _PyPfw LIBRARY DESTINATION ${PYTHON_MODULE_PATH}) +install(TARGETS _PyPfw LIBRARY DESTINATION ${PYTHON_MODULE_PATH} COMPONENT python) # install the generated Python file as well -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PyPfw.py DESTINATION ${PYTHON_MODULE_PATH}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PyPfw.py DESTINATION ${PYTHON_MODULE_PATH} + COMPONENT python) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 29ce10a3c..319616b02 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -43,8 +43,10 @@ export(EXPORT ParameterTargets install(EXPORT ParameterTargets DESTINATION lib/cmake/ParameterFramework FILE ParameterFrameworkTargets.cmake - NAMESPACE ParameterFramework::) + NAMESPACE ParameterFramework:: + COMPONENT dev) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ParameterFrameworkConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/ParameterFrameworkConfigVersion.cmake" - DESTINATION lib/cmake/ParameterFramework) + DESTINATION lib/cmake/ParameterFramework + COMPONENT dev) diff --git a/cpack/CMakeLists.txt b/cpack/CMakeLists.txt index 516ce4d66..25d929867 100644 --- a/cpack/CMakeLists.txt +++ b/cpack/CMakeLists.txt @@ -47,6 +47,8 @@ set(CPACK_WIX_UPGRADE_GUID "47E60D10-B344-445D-A2F6-5684CC8B1D47") if (WIN32) # On windows, pack compiler provided libraries (MSVC redistributable) with the project + # Have cpack make a specific archive for them + set(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT runtime_deps) include(InstallRequiredSystemLibraries) # TODO: pack libxml2.dll with the project endif() diff --git a/parameter/CMakeLists.txt b/parameter/CMakeLists.txt index 05c90af13..ca956f57e 100644 --- a/parameter/CMakeLists.txt +++ b/parameter/CMakeLists.txt @@ -132,19 +132,24 @@ target_link_libraries(parameter target_include_directories(parameter PUBLIC $ - PUBLIC $) + PUBLIC $ + INTERFACE $ + INTERFACE $) install(TARGETS parameter EXPORT ParameterTargets - LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib - INCLUDES DESTINATION "include/parameter/client" "include/parameter/plugin") + LIBRARY DESTINATION lib COMPONENT runtime + RUNTIME DESTINATION bin COMPONENT runtime + ARCHIVE DESTINATION lib COMPONENT dev) # Export an interface library for plugins to use (after the ParameterFramework # project is built and installed). It makes them link against libparameter and # use xmlserializer's and pfw_utilify's include directories. add_library(plugin INTERFACE) target_link_libraries(plugin INTERFACE parameter) -install(TARGETS plugin EXPORT ParameterTargets - INCLUDES DESTINATION "include/parameter/xmlserializer" "include/parameter/utility") +target_include_directories(plugin + INTERFACE $ + INTERFACE $) +install(TARGETS plugin EXPORT ParameterTargets COMPONENT dev) # Unfortunately, while the "plugin" interface library is suitable for external # plugins (built using the installed Parameter Framework) we want to build some # plugins before the whole project is installed. Therefore, they need to get @@ -164,7 +169,8 @@ install(FILES include/ParameterMgrPlatformConnector.h include/SelectionCriterionInterface.h include/SelectionCriterionTypeInterface.h - DESTINATION "include/parameter/client") + DESTINATION "include/parameter/client" + COMPONENT dev) # Core (plugin) headers install(FILES "${CMAKE_CURRENT_BINARY_DIR}/parameter_export.h" @@ -191,6 +197,8 @@ install(FILES Syncer.h TypeElement.h VirtualSubsystem.h - DESTINATION "include/parameter/plugin") + DESTINATION "include/parameter/plugin" + COMPONENT dev) install(DIRECTORY log/include/log/ - DESTINATION "include/parameter/plugin/log") + DESTINATION "include/parameter/plugin/log" + COMPONENT dev) diff --git a/remote-process/CMakeLists.txt b/remote-process/CMakeLists.txt index e27a101e8..a7fc63b79 100644 --- a/remote-process/CMakeLists.txt +++ b/remote-process/CMakeLists.txt @@ -35,5 +35,6 @@ if(NETWORKING) target_link_libraries(remote-process PRIVATE remote-processor pfw_utility asio ${CMAKE_THREAD_LIBS_INIT}) - install(TARGETS remote-process RUNTIME DESTINATION bin) + install(TARGETS remote-process RUNTIME DESTINATION bin + COMPONENT eng) endif() diff --git a/remote-processor/CMakeLists.txt b/remote-processor/CMakeLists.txt index 5887bf5ea..d1d0d3257 100644 --- a/remote-processor/CMakeLists.txt +++ b/remote-processor/CMakeLists.txt @@ -43,4 +43,6 @@ find_package(Threads REQUIRED) target_link_libraries(remote-processor PRIVATE pfw_utility asio ${CMAKE_THREAD_LIBS_INIT}) install(TARGETS remote-processor EXPORT ParameterTargets - LIBRARY DESTINATION lib RUNTIME DESTINATION bin) + LIBRARY DESTINATION lib COMPONENT runtime + RUNTIME DESTINATION bin COMPONENT runtime + ARCHIVE DESTINATION lib COMPONENT dev) diff --git a/schemas/CMakeLists.txt b/schemas/CMakeLists.txt index ba876fe5c..0b9dc6c1e 100644 --- a/schemas/CMakeLists.txt +++ b/schemas/CMakeLists.txt @@ -37,4 +37,5 @@ install(FILES ComponentLibrary.xsd Subsystem.xsd SystemClass.xsd W3cXmlAttributes.xsd - DESTINATION share/${PROJECT_NAME}/schemas) + DESTINATION share/${PROJECT_NAME}/schemas + COMPONENT eng) diff --git a/test/test-platform/CMakeLists.txt b/test/test-platform/CMakeLists.txt index 533de3c5a..5c54b4a7f 100644 --- a/test/test-platform/CMakeLists.txt +++ b/test/test-platform/CMakeLists.txt @@ -36,5 +36,5 @@ if(NETWORKING) # Workaround because asio is still leaking to test-platform target_link_libraries(test-platform PRIVATE asio) - install(TARGETS test-platform RUNTIME DESTINATION bin) + install(TARGETS test-platform RUNTIME DESTINATION bin COMPONENT eng) endif() diff --git a/tools/bash_completion/CMakeLists.txt b/tools/bash_completion/CMakeLists.txt index f2fb49111..435ee6917 100644 --- a/tools/bash_completion/CMakeLists.txt +++ b/tools/bash_completion/CMakeLists.txt @@ -27,4 +27,5 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. install(FILES remote-process - DESTINATION share/bash-completion/completions/) + DESTINATION share/bash-completion/completions/ + COMPONENT eng) diff --git a/tools/xmlGenerator/CMakeLists.txt b/tools/xmlGenerator/CMakeLists.txt index 72d1d95f2..a3567c5fe 100644 --- a/tools/xmlGenerator/CMakeLists.txt +++ b/tools/xmlGenerator/CMakeLists.txt @@ -29,7 +29,7 @@ add_executable(domainGeneratorConnector domainGeneratorConnector.cpp) target_link_libraries(domainGeneratorConnector PRIVATE parameter pfw_utility) -install(TARGETS domainGeneratorConnector RUNTIME DESTINATION bin) +install(TARGETS domainGeneratorConnector RUNTIME DESTINATION bin COMPONENT eng) install(PROGRAMS domainGenerator.sh @@ -40,4 +40,5 @@ install(PROGRAMS EddParser.py PFWScriptGenerator.py updateRoutageDomains.sh - DESTINATION bin) + DESTINATION bin + COMPONENT eng) diff --git a/tools/xmlValidator/CMakeLists.txt b/tools/xmlValidator/CMakeLists.txt index f44fed07e..536f94821 100644 --- a/tools/xmlValidator/CMakeLists.txt +++ b/tools/xmlValidator/CMakeLists.txt @@ -26,4 +26,4 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -install(PROGRAMS xmlValidator.py DESTINATION bin) +install(PROGRAMS xmlValidator.py DESTINATION bin COMPONENT eng) diff --git a/utility/CMakeLists.txt b/utility/CMakeLists.txt index 8173ecaa3..035027585 100644 --- a/utility/CMakeLists.txt +++ b/utility/CMakeLists.txt @@ -46,7 +46,8 @@ install(FILES ErrorContext.hpp Utility.h convert.hpp - DESTINATION "include/parameter/utility") + DESTINATION "include/parameter/utility" + COMPONENT dev) if(BUILD_TESTING) # Add unit test diff --git a/xmlserializer/CMakeLists.txt b/xmlserializer/CMakeLists.txt index 91f51d2fe..ee263a5f7 100644 --- a/xmlserializer/CMakeLists.txt +++ b/xmlserializer/CMakeLists.txt @@ -69,4 +69,5 @@ install(FILES XmlSource.h XmlElement.h XmlSerializingContext.h - DESTINATION "include/parameter/xmlserializer") + DESTINATION "include/parameter/xmlserializer" + COMPONENT dev)