# INTERFACE library is not allowed until cmake 3.1
add_custom_target(Boost.boost DEPENDS Boost)
else()
- add_library(Boost.boost INTERFACE IMPORTED)
- set_target_properties(Boost.boost PROPERTIES
+ add_library(Boost::boost INTERFACE IMPORTED)
+ set_target_properties(Boost::boost PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}")
- add_dependencies(Boost.boost Boost)
+ add_dependencies(Boost::boost Boost)
endif()
find_package_handle_standard_args(Boost DEFAULT_MSG
Boost_INCLUDE_DIRS Boost_LIBRARIES)
get_filename_component(ext ${src} EXT)
# assuming all cxx source files include boost header(s)
if(ext MATCHES ".cc|.cpp|.cxx")
- add_dependencies(${target} Boost.boost)
+ if(CMAKE_VERSION VERSION_LESS 3.3)
+ add_dependencies(${target} Boost.boost)
+ else()
+ add_dependencies(${target} Boost::boost)
+ endif()
return()
endif()
endforeach()