From b2e8a2bed582a9ccc70fbbf3c8586bdd712ea4d1 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 16 Jan 2024 13:43:36 +0100 Subject: [PATCH] CMakeLists.txt: restore readline support as an explicit option This was lost in autotools -> cmake transition. The particular reason to make it explicit is that readline is gpl version 3 licensed, and in some builds components under that license need to be excluded. --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b77755139a..d938cdd306 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ option(WITH_FSVERITY "Build with fsverity support" OFF) option(WITH_IMAEVM "Build with IMA support" OFF) option(WITH_FAPOLICYD "Build with fapolicyd support" ON) option(WITH_INTERNAL_OPENPGP "Use internal OpenPGP parser (DEPRECATED)" OFF) +option(WITH_READLINE "Build with readline support" ON) set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/lib/rpm" CACHE PATH "rpm home") set(RPM_MACROSDIR "${RPM_CONFIGDIR}/macros.d") @@ -193,7 +194,11 @@ find_package(BZip2) find_package(Iconv) pkg_check_modules(POPT REQUIRED IMPORTED_TARGET popt) -pkg_check_modules(READLINE IMPORTED_TARGET readline) + +if (WITH_READLINE) + pkg_check_modules(READLINE REQUIRED IMPORTED_TARGET readline) +endif() + pkg_check_modules(ZSTD IMPORTED_TARGET libzstd>=1.3.8) pkg_check_modules(LIBELF IMPORTED_TARGET libelf) pkg_check_modules(LIBDW IMPORTED_TARGET libdw)