FindBoost: Construct a clean Boost_LIBRARIES value
Construct the value from scratch based on the component library list. Avoid accumulating values from repeated find_package(Boost) calls. If Boost is not found, Boost_LIBRARIES should be empty.
This commit is contained in:
parent
5b9149e083
commit
0100f88e29
|
@ -1219,6 +1219,7 @@ endif()
|
||||||
# Notification to end user about what was found
|
# Notification to end user about what was found
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
set(Boost_LIBRARIES "")
|
||||||
if(Boost_FOUND)
|
if(Boost_FOUND)
|
||||||
if(NOT Boost_FIND_QUIETLY)
|
if(NOT Boost_FIND_QUIETLY)
|
||||||
message(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
|
message(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
|
||||||
|
@ -1232,7 +1233,7 @@ if(Boost_FOUND)
|
||||||
if(NOT Boost_FIND_QUIETLY)
|
if(NOT Boost_FIND_QUIETLY)
|
||||||
message (STATUS " ${COMPONENT}")
|
message (STATUS " ${COMPONENT}")
|
||||||
endif()
|
endif()
|
||||||
set(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY})
|
list(APPEND Boost_LIBRARIES ${Boost_${UPPERCOMPONENT}_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
else()
|
else()
|
||||||
|
|
Loading…
Reference in New Issue