Skip to content

Commit

Permalink
cmake: don't use builtin sha1 if not using ws
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fanquake authored and bluca committed Mar 25, 2024
1 parent 4a5ece5 commit 2a75ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -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")
Expand Down

0 comments on commit 2a75ef0

Please sign in to comment.