Skip to content

Commit d69f521

Browse files
committed
Fix build with Boost 1.89.0
Signed-off-by: Michael Cho <[email protected]>
1 parent 9138372 commit d69f521

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,21 @@ find_package(Zstd REQUIRED)
7979
find_package(ZLIB REQUIRED)
8080
find_package(OpenSSL REQUIRED)
8181
find_package(Threads)
82-
find_package(Boost 1.58 REQUIRED
83-
COMPONENTS
82+
set(PROXYGEN_BOOST_COMPONENTS
8483
iostreams
8584
context
8685
filesystem
8786
program_options
8887
regex
89-
system
9088
thread
9189
chrono
9290
)
91+
find_package(Boost 1.58 REQUIRED COMPONENTS ${PROXYGEN_BOOST_COMPONENTS})
92+
if (Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION LESS 69)
93+
list(APPEND PROXYGEN_BOOST_COMPONENTS system)
94+
find_package(Boost 1.58 REQUIRED COMPONENTS ${PROXYGEN_BOOST_COMPONENTS})
95+
endif()
96+
string(REPLACE ";" " " PROXYGEN_BOOST_COMPONENTS "${PROXYGEN_BOOST_COMPONENTS}")
9397

9498
list(APPEND
9599
_PROXYGEN_COMMON_COMPILE_OPTIONS

cmake/proxygen-config.cmake.in

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,7 @@ find_dependency(Fizz)
3131
find_dependency(ZLIB)
3232
find_dependency(OpenSSL)
3333
find_dependency(Threads)
34-
find_dependency(Boost 1.58 REQUIRED
35-
COMPONENTS
36-
iostreams
37-
context
38-
filesystem
39-
program_options
40-
regex
41-
system
42-
thread
43-
)
34+
find_dependency(Boost 1.58 REQUIRED COMPONENTS @PROXYGEN_BOOST_COMPONENTS@)
4435

4536
if(NOT TARGET proxygen::proxygen)
4637
include("${CMAKE_CURRENT_LIST_DIR}/proxygen-targets.cmake")

0 commit comments

Comments
 (0)