Skip to content

Commit 2a75ef0

Browse files
fanquakebluca
authored andcommitted
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.
1 parent 4a5ece5 commit 2a75ef0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ if(NOT ZMQ_USE_GNUTLS)
234234
endif()
235235
endif()
236236
endif()
237-
if(NOT ZMQ_USE_NSS)
237+
if(ENABLE_WS AND NOT ZMQ_USE_NSS)
238238
list(APPEND sources ${CMAKE_CURRENT_SOURCE_DIR}/external/sha1/sha1.c
239239
${CMAKE_CURRENT_SOURCE_DIR}/external/sha1/sha1.h)
240240
message(STATUS "Using builtin sha1")

0 commit comments

Comments
 (0)