How to import zeromq libraries in cmake?

后端 未结 3 878
长发绾君心
长发绾君心 2021-02-05 18:53

I\'m just starting to learn how to work with zeromq libraries and using them in different C++ projects. The sample code that I wrote (actually copied from there tutorials)is thi

3条回答
  •  攒了一身酷
    2021-02-05 19:18

    A cmake config file has been added to libzmq github repository Jan 7, 2017 here.

    This is not included in the latest release (4.2.1) yet, but I belive it should be in the next release.

    I have installed the head version using cmake and then installed cppzmq, which uses find_package(ZeroMQ REQUIRED) to locate libzmq. All worked like a charm.

    EDIT: The cmake config file is included in release 4.2.2 here. Then it was moved to directory builds/cmake at release 4.2.4. I didn't test it again but find_package(ZeroMQ REQUIRED) should just work since ibzmq 4.2.2.

提交回复
热议问题