mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-04 03:29:12 +08:00
29 lines
931 B
Diff
29 lines
931 B
Diff
|
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
|
||
|
+ $<TARGET_NAME_IF_EXISTS:Boost::context>
|
||
|
+ $<TARGET_NAME_IF_EXISTS:Boost::coroutine>
|
||
|
Boost::date_time
|
||
|
Boost::system
|
||
|
Boost::throw_exception
|
||
|
)
|
||
|
|
||
|
+if(NOT TARGET Boost::context)
|
||
|
+ target_compile_definitions(boost_asio INTERFACE $<$<NOT:$<TARGET_EXISTS:Boost::context>>:BOOST_ASIO_DISABLE_BOOST_CONTEXT_FIBER>)
|
||
|
+endif()
|
||
|
+
|
||
|
+if(NOT TARGET Boost::coroutine)
|
||
|
+ target_compile_definitions(boost_asio INTERFACE $<$<NOT:$<TARGET_EXISTS:Boost::coroutine>>: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")
|