blob: db83b176b4175413ad553c0047f9323df35f9d23 [file] [log] [blame]
From 3c2e529c6cc1bae4bc94cbed7358c6e0cdd2de02 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
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.
Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/2852]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
CMakeLists.txt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0a474106e..89e27417f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,6 +31,7 @@ option(WITH_AUDIT "Build with audit support" ON)
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_READLINE "Build with readline support" ON)
set(RPM_CONFIGDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/rpm" CACHE PATH "rpm home")
set(RPM_VENDOR "vendor" CACHE STRING "rpm vendor string")
@@ -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)