zeromq / zmqpp

0mq 'highlevel' C++ bindings
http://zeromq.github.io/zmqpp
Mozilla Public License 2.0
438 stars 195 forks source link

CMake FindPackage Support #194

Closed southie closed 7 years ago

southie commented 7 years ago

Added support for FindPackage(ZeroMQ), Added support for zmqppConfig.cmake to allow use of FindPackage(zmqpp) afer install. Added compiler support for MSVC 15 (VS2017). Added default debug prefix d to allow for installation of release and debug libraries (This is conditional on MSVC, I didn't want to break the non-Windows users, which appear to be in the majority)

Now there is some support for using the automatic searching provided by cmake for an installed version of ZeroMQ. There appears to be some issues installing the shared version of ZeroMQ, but it works with ZeroMQ static libraries out of the box. This may be related to zeromq/libzmq#2295, as it appears that Install support is in flux.

I also added baseline support for supporting FindPackage(zmqpp). I didn't find a good way to support versioning, since it seems a lot of activity is just performed on the develop branch. If zmqpp is installed, it will support basic FindPackage, including debug and release.

I also made some windows MSVC related changes to fix the build issues in #181 #182 #131: I included the winsock library issue in #182, and also addressed the issue when trying to build static only versions of the library.

As an aside, for those looking to compile on Universal Windows Platform, build works now for UWP if you define the usual definitions:

-DCMAKE_SYSTEM_NAME=WindowsStore
-DCMAKE_SYSTEM_VERSION=10.0

and add the additional cxx flag

-DCMAKE_CXX_FLAGS="/DWIN32_LEAN_AND_MEAN"

If it is more appropriate to open a new issue and create separate pull requests for these, let me know. They all seemed minor enough and only affect one file so I rolled them all into one.

sivabudh commented 6 years ago

Wait, were these changes merged to the develop branch?