33#
44include_guard (GLOBAL )
55
6- set (BOOST_VERSION 1.86 )
6+ set (BOOST_VERSION "1.87.0" )
77set (BOOST_COMPONENTS
88 filesystem
99 locale
1010 log
1111 program_options
12- system ) # system is not used by Sunshine, but by Simple-Web-Server, added here for convenience
12+ system
13+ )
14+ # system is not used by Sunshine, but by Simple-Web-Server, added here for convenience
15+
16+ # algorithm, preprocessor, scope, and uuid are not used by Sunshine, but by libdisplaydevice, added here for convenience
17+ if (WIN32 )
18+ list (APPEND BOOST_COMPONENTS
19+ algorithm
20+ preprocessor
21+ scope
22+ uuid
23+ )
24+ endif ()
1325
1426if (BOOST_USE_STATIC)
1527 set (Boost_USE_STATIC_LIBS ON ) # cmake-lint: disable=C0103
@@ -18,9 +30,9 @@ endif()
1830if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.30" )
1931 cmake_policy (SET CMP0167 NEW) # Get BoostConfig.cmake from upstream
2032endif ()
21- find_package (Boost CONFIG ${BOOST_VERSION} COMPONENTS ${BOOST_COMPONENTS} )
33+ find_package (Boost CONFIG ${BOOST_VERSION} EXACT COMPONENTS ${BOOST_COMPONENTS} )
2234if (NOT Boost_FOUND)
23- message (STATUS "Boost v${BOOST_VERSION} .x package not found in the system. Falling back to FetchContent." )
35+ message (STATUS "Boost v${BOOST_VERSION} package not found in the system. Falling back to FetchContent." )
2436 include (FetchContent)
2537
2638 if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0" )
@@ -41,12 +53,9 @@ if(NOT Boost_FOUND)
4153 set (BOOST_ENABLE_CMAKE ON )
4254
4355 # Limit boost to the required libraries only
44- set (BOOST_INCLUDE_LIBRARIES
45- ${BOOST_COMPONENTS} )
46- set (BOOST_URL
47- "https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.tar.xz" )
48- set (BOOST_HASH
49- "MD5=D02759931CEDC02ADED80402906C5EB6" )
56+ set (BOOST_INCLUDE_LIBRARIES ${BOOST_COMPONENTS} )
57+ set (BOOST_URL "https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION} /boost-${BOOST_VERSION} -cmake.tar.xz" ) # cmake-lint: disable=C0301
58+ set (BOOST_HASH "SHA256=7da75f171837577a52bbf217e17f8ea576c7c246e4594d617bfde7fafd408be5" )
5059
5160 if (CMAKE_VERSION VERSION_LESS "3.24.0" )
5261 FetchContent_Declare(
@@ -77,7 +86,7 @@ if(NOT Boost_FOUND)
7786
7887 set (Boost_FOUND TRUE ) # cmake-lint: disable=C0103
7988 set (Boost_INCLUDE_DIRS # cmake-lint: disable=C0103
80- "$<BUILD_INTERFACE:${Boost_SOURCE_DIR} /libs/headers/include>;$<INSTALL_INTERFACE:include/boost-1_85> " )
89+ "$<BUILD_INTERFACE:${Boost_SOURCE_DIR} /libs/headers/include>" )
8190
8291 if (WIN32 )
8392 # Windows build is failing to create .h file in this directory
0 commit comments