add_executable(
    chat
    "${PROJECT_SOURCE_DIR}/examples/chat/chat.c"
)

if (TARGET zyre)
    set(zyre_target zyre)
else ()
    set(zyre_target zyre-static)
endif ()

target_link_libraries(
    chat
    ${zyre_target}
    ${LIBZMQ_LIBRARIES}
    ${CZMQ_LIBRARIES}
    ${OPTIONAL_LIBRARIES}
)
set_target_properties(
    chat
    PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/examples/chat"
)
