Skip to content

Commit 10af948

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

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
@@ -80,17 +80,21 @@ find_package(ZLIB REQUIRED)
8080
find_package(OpenSSL REQUIRED)
8181
find_package(Threads)
8282
find_package(Cares)
83-
find_package(Boost 1.58 REQUIRED
84-
COMPONENTS
83+
set(PROXYGEN_BOOST_COMPONENTS
8584
iostreams
8685
context
8786
filesystem
8887
program_options
8988
regex
90-
system
9189
thread
9290
chrono
9391
)
92+
find_package(Boost 1.58 REQUIRED COMPONENTS ${PROXYGEN_BOOST_COMPONENTS})
93+
if (Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION LESS 69)
94+
list(APPEND PROXYGEN_BOOST_COMPONENTS system)
95+
find_package(Boost 1.58 REQUIRED COMPONENTS ${PROXYGEN_BOOST_COMPONENTS})
96+
endif()
97+
string(REPLACE ";" " " PROXYGEN_BOOST_COMPONENTS "${PROXYGEN_BOOST_COMPONENTS}")
9498

9599
list(APPEND
96100
_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)