File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ set(BOOST_HTTP_DEPENDENCIES
5858 Boost::capy
5959 Boost::config
6060 Boost::core
61- Boost::corosio
6261 Boost::json
6362 Boost::mp11
6463 Boost::static_assert
@@ -68,11 +67,17 @@ set(BOOST_HTTP_DEPENDENCIES
6867 Boost::url
6968 Boost::winapi)
7069
70+ # corosio is used header-only (only io_buffer_param.hpp)
71+ # We include it separately to avoid linking against the full library
72+ set (BOOST_HTTP_HEADER_ONLY_DEPENDENCIES corosio)
73+
7174foreach (BOOST_HTTP_DEPENDENCY ${BOOST_HTTP_DEPENDENCIES} )
7275 if (BOOST_HTTP_DEPENDENCY MATCHES "^[ ]*Boost::([A-Za-z0-9_]+)[ ]*$" )
7376 list (APPEND BOOST_HTTP_INCLUDE_LIBRARIES ${CMAKE_MATCH_1} )
7477 endif ()
7578endforeach ()
79+ # Add header-only dependencies to include list (but not link list)
80+ list (APPEND BOOST_HTTP_INCLUDE_LIBRARIES ${BOOST_HTTP_HEADER_ONLY_DEPENDENCIES} )
7681# Conditional dependencies
7782if (NOT BOOST_HTTP_MRDOCS_BUILD)
7883 if (BOOST_HTTP_BUILD_TESTS)
@@ -151,6 +156,8 @@ function(boost_http_setup_properties target)
151156 target_include_directories (${target} PUBLIC "${PROJECT_SOURCE_DIR} /include" )
152157 target_include_directories (${target} PRIVATE "${PROJECT_SOURCE_DIR} " )
153158 target_link_libraries (${target} PUBLIC ${BOOST_HTTP_DEPENDENCIES} )
159+ # Add corosio headers without linking (header-only usage)
160+ target_include_directories (${target} PUBLIC $<TARGET_PROPERTY :Boost ::corosio ,INTERFACE_INCLUDE_DIRECTORIES >)
154161 target_compile_definitions (${target} PUBLIC BOOST_HTTP_NO_LIB )
155162 target_compile_definitions (${target} PRIVATE BOOST_HTTP_SOURCE )
156163 if (BUILD_SHARED_LIBS )
Original file line number Diff line number Diff line change @@ -44,18 +44,18 @@ lib boost_http
4444 : http_sources
4545 : requirements
4646 <library>/boost//capy
47- <library>/boost/corosio//boost_corosio
4847 <library>/boost/json//boost_json/<warnings-as-errors>off
4948 <library>/boost//url
5049 <include>../
50+ <include>../../corosio/include
5151 <define>BOOST_HTTP_SOURCE
5252 <target-os>windows:<library>bcrypt_sys
5353 <target-os>darwin:<linkflags>"-framework Security"
5454 : usage-requirements
5555 <library>/boost//capy
56- <library>/boost/corosio//boost_corosio
5756 <library>/boost/json//boost_json/<warnings-as-errors>off
5857 <library>/boost//url
58+ <include>../../corosio/include
5959 <target-os>windows:<library>bcrypt_sys
6060 <target-os>darwin:<linkflags>"-framework Security"
6161 ;
Original file line number Diff line number Diff line change @@ -28,11 +28,12 @@ target_link_libraries(boost_http_limits PRIVATE
2828 Boost::config
2929 Boost::container_hash
3030 Boost::capy
31- Boost::corosio
3231 Boost::system
3332 Boost::throw_exception
3433 Boost::url
3534 Boost::utility )
35+ # Add corosio headers without linking (header-only usage)
36+ target_include_directories (boost_http_limits PRIVATE $<TARGET_PROPERTY :Boost ::corosio ,INTERFACE_INCLUDE_DIRECTORIES >)
3637
3738target_link_libraries (boost_http_limits INTERFACE Boost::http )
3839
You can’t perform that action at this time.
0 commit comments