diff --git a/CMakeLists.txt b/CMakeLists.txt index 02f09c5030..a15db7562d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -434,7 +434,8 @@ if(UMF_LINK_HWLOC_STATICALLY) install( FILES ${LIBHWLOC_LIBRARIES} DESTINATION ${CMAKE_INSTALL_LIBDIR} - RENAME libumf_hwloc.a) + RENAME libumf_hwloc.a + COMPONENT umf) endif() endif() endif() # UMF_LINK_HWLOC_STATICALLY @@ -1078,19 +1079,30 @@ if(WINDOWS AND UMF_USE_DEBUG_POSTFIX) COMPONENT umfd) endif() -install(FILES ${PROJECT_SOURCE_DIR}/LICENSE.TXT - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}/") +install( + FILES ${PROJECT_SOURCE_DIR}/LICENSE.TXT + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}/" + COMPONENT umf) install( FILES ${PROJECT_SOURCE_DIR}/licensing/third-party-programs.txt - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}/licensing/") + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}/licensing/" + COMPONENT umf) -install(DIRECTORY examples DESTINATION "${CMAKE_INSTALL_DOCDIR}") +install( + DIRECTORY examples + DESTINATION "${CMAKE_INSTALL_DOCDIR}" + COMPONENT umf) # Add the include directory and the headers target to the install. -install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/" - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install( + DIRECTORY "${PROJECT_SOURCE_DIR}/include/" + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT umf) -install(TARGETS umf_headers EXPORT ${PROJECT_NAME}-targets) +install( + TARGETS umf_headers + EXPORT ${PROJECT_NAME}-targets + COMPONENT umf) # Add the list of installed targets to the install. This includes the namespace # which all installed targets will be prefixed with, e.g. for the headers target @@ -1099,7 +1111,8 @@ install( EXPORT ${PROJECT_NAME}-targets FILE ${PROJECT_NAME}-targets.cmake NAMESPACE ${PROJECT_NAME}:: - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} + COMPONENT umf) # Configure the package versions file for use in find_package when installed. write_basic_package_version_file( @@ -1114,9 +1127,11 @@ configure_package_config_file( INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) # Add the package files to the install. -install(FILES ${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config.cmake - ${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config-version.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) +install( + FILES ${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config.cmake + ${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config-version.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} + COMPONENT umf) # Configure uninstall commands configure_file("${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0deb3eca52..faaed4aa1c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -214,7 +214,10 @@ target_include_directories( $ $) -install(TARGETS umf EXPORT ${PROJECT_NAME}-targets) +install( + TARGETS umf + EXPORT ${PROJECT_NAME}-targets + COMPONENT umf) if(UMF_PROXY_LIB_ENABLED) add_subdirectory(proxy_lib) diff --git a/src/base_alloc/CMakeLists.txt b/src/base_alloc/CMakeLists.txt index ed84cc9a54..2a198920b5 100644 --- a/src/base_alloc/CMakeLists.txt +++ b/src/base_alloc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2025 Intel Corporation +# Copyright (C) 2025-2026 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -24,5 +24,8 @@ target_include_directories(umf_ba PRIVATE ${UMF_CMAKE_SOURCE_DIR}/src/base_alloc) if(NOT UMF_BUILD_SHARED_LIBRARY) - install(TARGETS umf_ba EXPORT ${PROJECT_NAME}-targets) + install( + TARGETS umf_ba + EXPORT ${PROJECT_NAME}-targets + COMPONENT umf) endif() diff --git a/src/coarse/CMakeLists.txt b/src/coarse/CMakeLists.txt index 32465b4e4f..a47805d709 100644 --- a/src/coarse/CMakeLists.txt +++ b/src/coarse/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2024-2025 Intel Corporation +# Copyright (C) 2024-2026 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -20,5 +20,8 @@ target_include_directories( ${UMF_CMAKE_SOURCE_DIR}/src/ravl) if(NOT UMF_BUILD_SHARED_LIBRARY) - install(TARGETS umf_coarse EXPORT ${PROJECT_NAME}-targets) + install( + TARGETS umf_coarse + EXPORT ${PROJECT_NAME}-targets + COMPONENT umf) endif() diff --git a/src/proxy_lib/CMakeLists.txt b/src/proxy_lib/CMakeLists.txt index 494ef1ef23..c9a8502ea0 100644 --- a/src/proxy_lib/CMakeLists.txt +++ b/src/proxy_lib/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2023-2025 Intel Corporation +# Copyright (C) 2023-2026 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -43,4 +43,7 @@ target_include_directories( umf_proxy PRIVATE ${UMF_CMAKE_SOURCE_DIR}/src/base_alloc ${UMF_CMAKE_SOURCE_DIR}/src/ravl) -install(TARGETS umf_proxy EXPORT ${PROJECT_NAME}-targets) +install( + TARGETS umf_proxy + EXPORT ${PROJECT_NAME}-targets + COMPONENT umf) diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index e26017e79d..8ebc87d2a7 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2023-2025 Intel Corporation +# Copyright (C) 2023-2026 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -36,5 +36,8 @@ add_umf_library( LIBS ${UMF_UTILS_LIBS} ${CMAKE_THREAD_LIBS_INIT}) if(NOT UMF_BUILD_SHARED_LIBRARY) - install(TARGETS umf_utils EXPORT ${PROJECT_NAME}-targets) + install( + TARGETS umf_utils + EXPORT ${PROJECT_NAME}-targets + COMPONENT umf) endif()