@@ -132,6 +132,9 @@ file(GLOB_RECURSE BOOST_COROSIO_HEADERS CONFIGURE_DEPENDS
132132file (GLOB_RECURSE BOOST_COROSIO_SOURCES CONFIGURE_DEPENDS
133133 "${CMAKE_CURRENT_SOURCE_DIR} /src/*.hpp"
134134 "${CMAKE_CURRENT_SOURCE_DIR} /src/*.cpp" )
135+ # Exclude wolfssl files from main library (they are added separately when WolfSSL is found)
136+ list (FILTER BOOST_COROSIO_HEADERS EXCLUDE REGEX ".*/wolfssl/.*" )
137+ list (FILTER BOOST_COROSIO_SOURCES EXCLUDE REGEX ".*/wolfssl/.*" )
135138
136139source_group ("" FILES "include/boost/corosio.hpp" )
137140source_group (TREE "${CMAKE_CURRENT_SOURCE_DIR} /include/boost/corosio" PREFIX "include" FILES ${BOOST_COROSIO_HEADERS} )
@@ -147,6 +150,7 @@ function(boost_corosio_setup_properties target)
147150 $<$<PLATFORM_ID :Windows >:ws2_32 >)
148151 target_compile_definitions (${target} PUBLIC BOOST_COROSIO_NO_LIB )
149152 target_compile_definitions (${target} PRIVATE BOOST_COROSIO_SOURCE )
153+ target_compile_definitions (${target} PRIVATE $<$<PLATFORM_ID :Windows >:_WIN32_WINNT =0x0602 >)
150154 if (BUILD_SHARED_LIBS )
151155 target_compile_definitions (${target} PUBLIC BOOST_COROSIO_DYN_LINK )
152156 else ()
@@ -157,6 +161,21 @@ function(boost_corosio_setup_properties target)
157161 $<$<CXX_COMPILER_ID :GNU >:-fcoroutines >)
158162endfunction ()
159163
164+ #-------------------------------------------------
165+ #
166+ # MrDocs Build (minimal for documentation)
167+ #
168+ #-------------------------------------------------
169+ if (BOOST_COROSIO_MRDOCS_BUILD)
170+ file (WRITE "${CMAKE_CURRENT_BINARY_DIR} /mrdocs.cpp"
171+ "#include <boost/corosio.hpp>\n " )
172+ add_library (boost_corosio_mrdocs "${CMAKE_CURRENT_BINARY_DIR} /mrdocs.cpp" )
173+ boost_corosio_setup_properties (boost_corosio_mrdocs )
174+ target_compile_definitions (boost_corosio_mrdocs PUBLIC BOOST_COROSIO_MRDOCS )
175+ set_target_properties (boost_corosio_mrdocs PROPERTIES EXPORT_COMPILE_COMMANDS ON )
176+ return ()
177+ endif ()
178+
160179add_library (boost_corosio ${BOOST_COROSIO_HEADERS} ${BOOST_COROSIO_SOURCES} )
161180add_library (Boost::corosio ALIAS boost_corosio )
162181boost_corosio_setup_properties (boost_corosio )
0 commit comments