Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Findlibzmq.cmake doesn't work on Win32 #1168

Merged
merged 1 commit into from
Apr 21, 2019

Conversation

myd7349
Copy link
Contributor

@myd7349 myd7349 commented Apr 21, 2019

Findlibzmq.cmake doesn't work out-of-box on Win32.
libzmq dll/lib built with MSVC is named using the Boost convention(something like libzmq-mt-4_3_1.lib, libzmq-mt-4_3_1.dll): https://github.com/zeromq/libzmq/blob/master/CMakeLists.txt#L1147-L1173
So find_library (LIBZMQ_LIBRARIES NAMES zmq HINTS ${PC_LIBZMQ_LIBRARY_HINTS}) will not work.

This patch tries to solve the libzmq not found error on Win32 with CMake:
zeromq/czmq#1972 (comment)
zeromq/czmq#2004

@myd7349 myd7349 marked this pull request as ready for review April 21, 2019 07:55
@myd7349
Copy link
Contributor Author

myd7349 commented Apr 21, 2019

I'm not sure if it the best way to solve this problem. If there is a better one, just let me know.

@bluca bluca merged commit 303b4fe into zeromq:master Apr 21, 2019
@bluca
Copy link
Member

bluca commented Apr 21, 2019

Does it have to be specific to libzmq? Shouldn't it be a general solution for all libraries?

@myd7349 myd7349 deleted the win32-find-libzmq branch April 23, 2019 09:53
@myd7349
Copy link
Contributor Author

myd7349 commented Apr 23, 2019

@bluca Thanks!
AFAIK, only a few of libraries(ZeroMQ, Boost) built on Windows use this naming strategy. So there is no need to be a general solution currently.
Some other libraries may use a totally different strategy. For example, I found some libraries built in Debug mode contains a d suffix. And for these libraries, neither of the two solution will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants