diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ad3c1de2f..c918c7707d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,13 +17,21 @@ target_link_libraries(boost_asio Boost::align Boost::assert Boost::config - Boost::context - Boost::coroutine + $ + $ Boost::date_time Boost::system Boost::throw_exception ) +if(NOT TARGET Boost::context) + target_compile_definitions(boost_asio INTERFACE $<$>:BOOST_ASIO_DISABLE_BOOST_CONTEXT_FIBER>) +endif() + +if(NOT TARGET Boost::coroutine) + target_compile_definitions(boost_asio INTERFACE $<$>:BOOST_ASIO_DISABLE_BOOST_COROUTINE>) +endif() + target_compile_features(boost_asio INTERFACE cxx_std_11) if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")