2
0
mirror of https://github.com/boostorg/cmake.git synced 2026-01-19 04:02:15 +00:00

Merge pull request #90 from Flamefire/install-msg-fix

Avoid installing libraries multiple times or issueing wrong message
This commit is contained in:
Peter Dimov
2025-09-28 21:58:52 +03:00
committed by GitHub
2 changed files with 7 additions and 0 deletions

View File

@@ -320,6 +320,8 @@ function(boost_install_target)
install(EXPORT ${LIB}-targets DESTINATION "${CONFIG_INSTALL_DIR}" NAMESPACE Boost:: FILE ${LIB}-targets.cmake)
set_target_properties(${LIB} PROPERTIES _boost_is_installed ON)
set(CONFIG_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/tmpinst/${LIB}-config.cmake")
set(CONFIG_FILE_CONTENTS "# Generated by BoostInstall.cmake for ${LIB}-${__VERSION}\n\n")

View File

@@ -182,6 +182,11 @@ function(__boost_auto_install __boost_lib)
if(TARGET "Boost::${__boost_lib_target}" AND TARGET "boost_${__boost_lib_target}")
get_target_property(is_installed "boost_${__boost_lib_target}" _boost_is_installed)
if(is_installed)
return() # Ignore libraries for which boost_install was already called
endif()
get_target_property(__boost_lib_incdir "boost_${__boost_lib_target}" INTERFACE_INCLUDE_DIRECTORIES)
set(incdir "${BOOST_SUPERPROJECT_SOURCE_DIR}/libs/${__boost_lib}/include")