Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
8 changes: 6 additions & 2 deletions bindings/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 4 additions & 2 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 2 additions & 0 deletions cpack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
24 changes: 16 additions & 8 deletions parameter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,24 @@ target_link_libraries(parameter

target_include_directories(parameter
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/log/include>)
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/log/include>
INTERFACE $<INSTALL_INTERFACE:include/parameter/client>
INTERFACE $<INSTALL_INTERFACE:include/parameter/plugin>)

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 $<INSTALL_INTERFACE:include/parameter/xmlserializer>
INTERFACE $<INSTALL_INTERFACE:include/parameter/utility>)
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
Expand All @@ -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"
Expand All @@ -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)
3 changes: 2 additions & 1 deletion remote-process/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
4 changes: 3 additions & 1 deletion remote-processor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 2 additions & 1 deletion schemas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion test/test-platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
3 changes: 2 additions & 1 deletion tools/bash_completion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
5 changes: 3 additions & 2 deletions tools/xmlGenerator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,4 +40,5 @@ install(PROGRAMS
EddParser.py
PFWScriptGenerator.py
updateRoutageDomains.sh
DESTINATION bin)
DESTINATION bin
COMPONENT eng)
2 changes: 1 addition & 1 deletion tools/xmlValidator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 2 additions & 1 deletion utility/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion xmlserializer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ install(FILES
XmlSource.h
XmlElement.h
XmlSerializingContext.h
DESTINATION "include/parameter/xmlserializer")
DESTINATION "include/parameter/xmlserializer"
COMPONENT dev)