From e8d679922ab183d6351bf3359413f780a6fb3da0 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Tue, 5 May 2026 15:35:50 +1000 Subject: [PATCH] chore: allow to build and expose nettle for attachment encrypt/decrypt --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 123cd110..40669427 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,7 @@ option(USE_LTO "Use Link-Time Optimization" ${use_lto_default}) # Provide this as an option for now because GMP and Desktop are sometimes unhappy with each other. option(ENABLE_NETWORKING "Build with networking functionality" ON) option(ENABLE_NETWORKING_SROUTER "Build with session-router networking support (requires ENABLE_NETWORKING)" ON) +option(ENABLE_NETTLE "Build with Nettle crypto library (independent of onionreq, e.g. for AES-CBC)" ${ENABLE_NETWORKING}) if(USE_LTO) include(CheckIPOSupported) @@ -120,9 +121,9 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) add_subdirectory(external) -if(ENABLE_NETWORKING) +if(ENABLE_NETWORKING OR ENABLE_NETTLE) if(NOT TARGET nettle::nettle) - if(BUILD_STATIC_DEPS) + if(BUILD_STATIC_DEPS AND TARGET nettle_external) message(FATAL_ERROR "Internal error: nettle::nettle target (expected via libquic BUILD_STATIC_DEPS) not found") else() find_package(PkgConfig REQUIRED)