From 99203f2d143b39b09a7b0f0547477c9f98ddb325 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Mon, 14 Sep 2020 16:56:05 +0200 Subject: Added partial CMake package component support --- kernel/cmake/kernel.cmake | 3 ++- .../tests/testcases/kernel/syscalls/ioctl/CMakeLists.txt | 16 +++++++++++++++- utils/CMakeLists.txt | 3 ++- utils/sys-utils/CMakeLists.txt | 6 ++++-- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/kernel/cmake/kernel.cmake b/kernel/cmake/kernel.cmake index 8fa8c2d..90553f6 100644 --- a/kernel/cmake/kernel.cmake +++ b/kernel/cmake/kernel.cmake @@ -34,5 +34,6 @@ macro(add_kernel_module MODULE_NAME KERNEL_DIR MODULE_MACRO MODULE_SOURCE_FILES add_custom_target(${MODULE_NAME} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}/${MODULE_NAME}.ko ${ARGV6}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}/${MODULE_NAME}.ko DESTINATION ${KERNEL_DIR}/extra - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + COMPONENT main) endmacro(add_kernel_module) \ No newline at end of file diff --git a/kernel/tests/testcases/kernel/syscalls/ioctl/CMakeLists.txt b/kernel/tests/testcases/kernel/syscalls/ioctl/CMakeLists.txt index 6c477f5..79bfa58 100644 --- a/kernel/tests/testcases/kernel/syscalls/ioctl/CMakeLists.txt +++ b/kernel/tests/testcases/kernel/syscalls/ioctl/CMakeLists.txt @@ -5,27 +5,41 @@ project(xloop-kernel-test-ioctl_xloop) # test ioctl_xloop01 add_executable(ioctl_xloop01 ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_xloop01.c) target_link_libraries(ioctl_xloop01 LINK_PUBLIC libltp) +install(TARGETS ioctl_xloop01 DESTINATION bin + COMPONENT test) # test ioctl_xloop02 add_executable(ioctl_xloop02 ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_xloop02.c) target_link_libraries(ioctl_xloop02 LINK_PUBLIC libltp) +install(TARGETS ioctl_xloop02 DESTINATION bin + COMPONENT test) # test ioctl_xloop03 add_executable(ioctl_xloop03 ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_xloop03.c) target_link_libraries(ioctl_xloop03 LINK_PUBLIC libltp) +install(TARGETS ioctl_xloop03 DESTINATION bin + COMPONENT test) # test ioctl_xloop04 add_executable(ioctl_xloop04 ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_xloop04.c) target_link_libraries(ioctl_xloop04 LINK_PUBLIC libltp) +install(TARGETS ioctl_xloop04 DESTINATION bin + COMPONENT test) # test ioctl_xloop05 add_executable(ioctl_xloop05 ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_xloop05.c) target_link_libraries(ioctl_xloop05 LINK_PUBLIC libltp) +install(TARGETS ioctl_xloop05 DESTINATION bin + COMPONENT test) # test ioctl_xloop06 add_executable(ioctl_xloop06 ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_xloop06.c) target_link_libraries(ioctl_xloop06 LINK_PUBLIC libltp) +install(TARGETS ioctl_xloop06 DESTINATION bin + COMPONENT test) # test ioctl_xloop07 add_executable(ioctl_xloop07 ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_xloop07.c) -target_link_libraries(ioctl_xloop07 LINK_PUBLIC libltp) \ No newline at end of file +target_link_libraries(ioctl_xloop07 LINK_PUBLIC libltp) +install(TARGETS ioctl_xloop07 DESTINATION bin + COMPONENT test) diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 1388f2b..01e0793 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -23,4 +23,5 @@ add_subdirectory(sys-utils) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bash-completion/xlosetup DESTINATION /usr/share/bash-completion/completions - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) \ No newline at end of file + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + COMPONENT main) diff --git a/utils/sys-utils/CMakeLists.txt b/utils/sys-utils/CMakeLists.txt index 8f3ee47..38e2def 100644 --- a/utils/sys-utils/CMakeLists.txt +++ b/utils/sys-utils/CMakeLists.txt @@ -7,8 +7,10 @@ project(xloop-utils-sys-utils) add_executable(xlosetup ${CMAKE_CURRENT_SOURCE_DIR}/xlosetup.c) target_link_libraries(xlosetup LINK_PUBLIC libcommon libsmartcols) target_include_directories(xlosetup PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../lib ${CMAKE_CURRENT_SOURCE_DIR}/../libsmartcols) -install(TARGETS xlosetup DESTINATION bin) +install(TARGETS xlosetup DESTINATION bin + COMPONENT main) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/xlosetup.8 DESTINATION /usr/share/man/man8 - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) \ No newline at end of file + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + COMPONENT main) -- cgit v1.2.3-55-g7522