
if (${USE_ZEROMQ})

    find_package(ZeroMQ REQUIRED)
    find_package(Threads REQUIRED)

    set (janacontrol_PLUGIN_SOURCES
        janacontrol.cc
        JControlZMQ.cc
        JControlEventProcessor.cc)

    set (janacontrol_PLUGIN_HEADERS
        JControlZMQ.h
        JControlEventProcessor.h)

    set (janacontrol_PLUGIN_TESTS
        janacontrol_tests.cc
    )

    add_jana_plugin(janacontrol
        SOURCES ${janacontrol_PLUGIN_SOURCES}
        PUBLIC_HEADER ${janacontrol_PLUGIN_HEADERS}
        TESTS ${janacontrol_PLUGIN_TESTS})

    target_link_libraries(janacontrol PUBLIC libzmq)
    target_link_libraries(janacontrol-tests PUBLIC libzmq)

else()
    message(STATUS "Skipping plugins/janacontrol because USE_ZEROMQ=Off")

endif()


