11cmake_minimum_required (VERSION 3.10 )
22
33project (slick-stream-buffer
4- VERSION 1.0.3
5- DESCRIPTION "A C++ lock-free SPMC byte stream buffer with a Boost.Asio DynamicBuffer adapter "
4+ VERSION 1.0.4
5+ DESCRIPTION "A C++ lock-free SPMC byte stream buffer"
66 LANGUAGES CXX )
77
88set (CMAKE_CXX_STANDARD 20)
@@ -28,25 +28,6 @@ else()
2828 message (STATUS "slick-shm: ${slick-shm_VERSION} " )
2929endif ()
3030
31- # Boost.Asio is only needed by the optional dynamic_stream_buffer adapter header.
32- # vcpkg/CMake-built Boost exports an asio component (Boost::asio), but b2/system
33- # installs expose header-only libs only through Boost::headers, so the component
34- # lookup can fail even when the asio headers are installed. Fall back to plain
35- # Boost and verify the asio header actually exists.
36- find_package (Boost CONFIG QUIET COMPONENTS asio )
37- set (SLICK_HAS_BOOST_ASIO ${Boost_FOUND} )
38- if (NOT Boost_FOUND)
39- find_package (Boost CONFIG QUIET )
40- if (Boost_FOUND)
41- unset (SLICK_BOOST_ASIO_BUFFER_HPP CACHE )
42- find_file (SLICK_BOOST_ASIO_BUFFER_HPP boost/asio/buffer.hpp
43- PATHS ${Boost_INCLUDE_DIRS} NO_DEFAULT_PATH )
44- if (SLICK_BOOST_ASIO_BUFFER_HPP)
45- set (SLICK_HAS_BOOST_ASIO TRUE )
46- endif ()
47- endif ()
48- endif ()
49-
5031add_library (slick-stream-buffer INTERFACE )
5132add_library (slick::stream_buffer ALIAS slick-stream-buffer )
5233
@@ -66,15 +47,6 @@ if(BUILD_SLICK_STREAM_BUFFER_TESTS)
6647 add_subdirectory (tests )
6748endif ()
6849
69- # Installation rules - the Boost.Asio adapter header is only exposed when Boost.Asio is found
70- if (SLICK_HAS_BOOST_ASIO)
71- message (STATUS "Boost.Asio found (Boost ${Boost_VERSION} ) - installing slick/dynamic_stream_buffer.h" )
72- install (DIRECTORY include/ DESTINATION include)
73- else ()
74- message (STATUS "Boost.Asio not found - slick/dynamic_stream_buffer.h will not be installed" )
75- install (DIRECTORY include/ DESTINATION include PATTERN "dynamic_stream_buffer.h" EXCLUDE)
76- endif ()
77-
7850# Generate and install CMake config files for vcpkg compatibility
7951include (CMakePackageConfigHelpers )
8052
0 commit comments