diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindBoost.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 9e6083db..38ccf78 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1573,7 +1573,7 @@ endif() # Add imported targets # ------------------------------------------------------------------------ -if(Boost_FOUND AND _Boost_IMPORTED_TARGETS) +if(Boost_FOUND) # For header-only libraries if(NOT TARGET Boost::boost) add_library(Boost::boost INTERFACE IMPORTED) @@ -1584,7 +1584,7 @@ if(Boost_FOUND AND _Boost_IMPORTED_TARGETS) endif() foreach(COMPONENT ${Boost_FIND_COMPONENTS}) - if(NOT TARGET Boost::${COMPONENT}) + if(_Boost_IMPORTED_TARGETS AND NOT TARGET Boost::${COMPONENT}) string(TOUPPER ${COMPONENT} UPPERCOMPONENT) if(Boost_${UPPERCOMPONENT}_FOUND) if(Boost_USE_STATIC_LIBS) |