Skip to content

Commit 882796e

Browse files
committed
CMake: Fix build with Boost 1.89.0
1 parent 6e9e34e commit 882796e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,17 @@ else()
173173
set(INNOEXTRACT_HAVE_LZMA 0)
174174
endif()
175175

176-
find_package(Boost REQUIRED COMPONENTS
176+
set(BOOST_REQUIRED_COMPONENTS
177177
iostreams
178178
filesystem
179179
date_time
180-
system
181180
program_options
182181
)
182+
find_package(Boost REQUIRED COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
183+
if(Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION LESS 69)
184+
list(APPEND BOOST_REQUIRED_COMPONENTS system)
185+
find_package(Boost REQUIRED COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
186+
endif()
183187
list(APPEND LIBRARIES ${Boost_LIBRARIES})
184188
link_directories(${Boost_LIBRARY_DIRS})
185189
include_directories(SYSTEM ${Boost_INCLUDE_DIR})

0 commit comments

Comments
 (0)