diff options
author | Maciej Sroczyński <macieksroczynski@poczta.fm> | 2023-03-14 22:48:08 (GMT) |
---|---|---|
committer | Maciej Sroczyński <macieksroczynski@poczta.fm> | 2023-03-14 22:48:08 (GMT) |
commit | abad8af018b232a089ea6397383a2b8fc4422cc2 (patch) | |
tree | 4611bd38ef37173ad102d5bbd8b1ba0d1c8e3e3f /googletest | |
parent | 391ce627def20c1e8a54d10b12949b15086473dd (diff) | |
download | googletest-abad8af018b232a089ea6397383a2b8fc4422cc2.zip googletest-abad8af018b232a089ea6397383a2b8fc4422cc2.tar.gz googletest-abad8af018b232a089ea6397383a2b8fc4422cc2.tar.bz2 |
Add COMPONENT to installrefs/pull/4188/head
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/CMakeLists.txt | 2 | ||||
-rw-r--r-- | googletest/cmake/internal_utils.cmake | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt index 95bfa44..d06c147 100644 --- a/googletest/CMakeLists.txt +++ b/googletest/CMakeLists.txt @@ -100,12 +100,14 @@ if (INSTALL_GTEST) set(version_file "${generated_dir}/${cmake_package_name}ConfigVersion.cmake") write_basic_package_version_file(${version_file} VERSION ${GOOGLETEST_VERSION} COMPATIBILITY AnyNewerVersion) install(EXPORT ${targets_export_name} + COMPONENT "${PROJECT_NAME}" NAMESPACE ${cmake_package_name}:: DESTINATION ${cmake_files_install_dir}) set(config_file "${generated_dir}/${cmake_package_name}Config.cmake") configure_package_config_file("${gtest_SOURCE_DIR}/cmake/Config.cmake.in" "${config_file}" INSTALL_DESTINATION ${cmake_files_install_dir}) install(FILES ${version_file} ${config_file} + COMPONENT "${PROJECT_NAME}" DESTINATION ${cmake_files_install_dir}) endif() diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index b09da33..edf637e 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -327,10 +327,12 @@ endfunction() function(install_project) if(INSTALL_GTEST) install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/" + COMPONENT "${PROJECT_NAME}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") # Install the project targets. install(TARGETS ${ARGN} EXPORT ${targets_export_name} + COMPONENT "${PROJECT_NAME}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") @@ -342,6 +344,7 @@ function(install_project) get_target_property(t_pdb_output_directory ${t} PDB_OUTPUT_DIRECTORY) install(FILES "${t_pdb_output_directory}/\${CMAKE_INSTALL_CONFIG_NAME}/$<$<CONFIG:Debug>:${t_pdb_name_debug}>$<$<NOT:$<CONFIG:Debug>>:${t_pdb_name}>.pdb" + COMPONENT "${PROJECT_NAME}" DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL) endforeach() @@ -352,6 +355,7 @@ function(install_project) configure_file("${PROJECT_SOURCE_DIR}/cmake/${t}.pc.in" "${configured_pc}" @ONLY) install(FILES "${configured_pc}" + COMPONENT "${PROJECT_NAME}" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") endforeach() endif() |