From 52d39dfdffa29d7ba32231b62848b7d433025e75 Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Tue, 3 Mar 2026 12:05:07 +0100 Subject: [PATCH] Make boost::system optional This is a header-only component since Boost 1.69 and the stub library is no longer available since 1.89, which breaks builds requiring it. This makes it optional to allow building with older versions of Boost. (innoextract doesn't use it directly so it could probably be removed entirely, but I haven't checked builds with older versions of Boost.) See https://www.boost.org/releases/1.89.0/ for details. Signed-off-by: Stephen Kitt --- CMakeLists.txt | 3 ++- README.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6995610..df284d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,8 +177,9 @@ find_package(Boost REQUIRED COMPONENTS iostreams filesystem date_time - system program_options + OPTIONAL_COMPONENTS + system ) list(APPEND LIBRARIES ${Boost_LIBRARIES}) link_directories(${Boost_LIBRARY_DIRS}) diff --git a/README.md b/README.md index 3a5e826..40a056f 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Author: [Daniel Scharrer](https://constexpr.org/) * **liblzma** from [xz-utils](https://tukaani.org/xz/) *(optional)* * **iconv** (*optional*, either as part of the system libc, as is the case with [glibc](https://www.gnu.org/software/libc/) and [uClibc](https://uclibc.org/), or as a separate [libiconv](https://www.gnu.org/software/libiconv/)) -For Boost you will need the headers as well as the `iostreams`, `filesystem`, `date_time`, `system` and `program_options` libraries. Older Boost version may work but are not actively supported. The boost `iostreams` library needs to be build with zlib and bzip2 support. +For Boost you will need the headers as well as the `iostreams`, `filesystem`, `date_time` and `program_options` libraries. Older Boost versions may work but are not actively supported. The boost `iostreams` library needs to be built with zlib and bzip2 support. While innoextract can be built without liblzma by manually setting `-DUSE_LZMA=OFF`, it is highly recommended and you won't be able to extract most installers created by newer Inno Setup versions without it.