I was snooping around in FindBoost.cmake and found
IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
# if the generator supports configuration types then set
# optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
# if there are no configuration types and CMAKE_BUILD_TYPE has no value
# then just use the release libraries
SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
ENDIF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
Note the Boost_${basename}_LIBRARY
This was/is a result of a rogue find_package(Boost ...) which was setting ${Boost_FILESYSTEM_LIBRARY} :
find_package( Boost REQUIRED COMPONENTS system filesystem NO_MODULE )
Now that this has been removed:
MESSAGE( "Boost_FILESYSTEM_LIBRARY = " ${Boost_FILESYSTEM_LIBRARY} )
now returns
Boost_FILESYSTEM_LIBRARY =
which I am not sure is a step in the right direction, it may in fact be a step sideways and one step backwards.
I am now snooping though BoostCore.cmake.... Would be nice if BoostCore would generate these targets... maybe it does. And I thought Boost.Build V2 was bad.
Brian