Skip to content

Commit d9f3a6b

Browse files
committed
Fix ZeroMQ linking on Windows
1 parent c4730da commit d9f3a6b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,13 @@ find_package(ZeroMQ REQUIRED) # Creates libzmq target
330330
# others (Ubuntu) bundle them in with libzmq itself
331331
find_package(cppzmq QUIET) # Creates cppzmq target
332332

333-
# Include ZeroMQ headers (needed for compile)
334-
target_link_libraries(openshot PUBLIC libzmq)
333+
# Link ZeroMQ (shared or static, whichever's found)
334+
if (TARGET libzmq)
335+
target_link_libraries(openshot PUBLIC libzmq)
336+
elseif (TARGET libzmq-static)
337+
target_link_libraries(openshot PRIVATE libzmq-static)
338+
endif()
339+
# Include cppzmq headers, if not bundled into libzmq
335340
if (TARGET cppzmq)
336341
target_link_libraries(openshot PUBLIC cppzmq)
337342
endif()

0 commit comments

Comments
 (0)