From 2a75ef07be0ba76f86592e10b999331cd6124d52 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 25 Mar 2024 14:23:22 +0000 Subject: [PATCH] cmake: don't use builtin sha1 if not using ws The builtin SHA1 (ZMQ_USE_BUILTIN_SHA1) is only used in the websocket engine (ws_engine.cpp), so if websockets are disabled, i.e -DENABLE_DRAFTS=OFF, don't add sha1.c to the sources list. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 200a82e5fa..6b62cc1ec3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,7 +234,7 @@ if(NOT ZMQ_USE_GNUTLS) endif() endif() endif() - if(NOT ZMQ_USE_NSS) + if(ENABLE_WS AND NOT ZMQ_USE_NSS) list(APPEND sources ${CMAKE_CURRENT_SOURCE_DIR}/external/sha1/sha1.c ${CMAKE_CURRENT_SOURCE_DIR}/external/sha1/sha1.h) message(STATUS "Using builtin sha1")