You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In FindZeroMQ.cmake, the below section assumes there will be a variable ${CMAKE_VS_PLATFORM_TOOLSET} defined. If not, the find_library calls fail. I built ZeroMQ with a Visual Studio compiler, but not with the IDE. This leaves ${CMAKE_VS_PLATFORM_TOOLSET} empty. My ZeroMQ library is installed with the filename: libzmq-mt-gd-4_3_5.lib. The finder can't identify this.
My non-azmq project is able to find ZeroMQ just fine, however, by relying on the ZeroMQConfig.cmake that is provided by ZeroMQ and installed alongside the library artifacts.
All it would take to fix this is to add a 3rd line in each of the NAMES section for Windows without the ${CMAKE_VS_PLATFORM_TOOLSET}- to the FindZeroMQ.cmake provided in azmq.
if (NOT ${CMAKE_CXX_PLATFORM_ID} STREQUAL "Windows")
find_library(ZeroMQ_LIBRARIES NAMES zmq HINTS ${_ZeroMQ_ROOT}/lib)
else()
message("CMAKE_VS_PLATFORM_TOOLSET: ${CMAKE_VS_PLATFORM_TOOLSET}")
find_library(
ZeroMQ_LIBRARY_RELEASE
NAMES
libzmq
"libzmq-${CMAKE_VS_PLATFORM_TOOLSET}-mt-${ZeroMQ_VERSION_MAJOR}_${ZeroMQ_VERSION_MINOR}_${ZeroMQ_VERSION_PATCH}"
HINTS
${_ZeroMQ_ROOT}/lib
)
find_library(
ZeroMQ_LIBRARY_DEBUG
NAMES
libzmq_d
"libzmq-${CMAKE_VS_PLATFORM_TOOLSET}-mt-gd-${ZeroMQ_VERSION_MAJOR}_${ZeroMQ_VERSION_MINOR}_${ZeroMQ_VERSION_PATCH}"
HINTS
${_ZeroMQ_ROOT}/lib)
# On Windows we have to use corresponding version (i.e. Release or Debug) of ZeroMQ because of `errno` CRT global variable
# See more at http://www.drdobbs.com/avoiding-the-visual-c-runtime-library/184416623
set(ZeroMQ_LIBRARIES optimized "${ZeroMQ_LIBRARY_RELEASE}" debug "${ZeroMQ_LIBRARY_DEBUG}")
endif()
The text was updated successfully, but these errors were encountered:
In FindZeroMQ.cmake, the below section assumes there will be a variable
${CMAKE_VS_PLATFORM_TOOLSET}
defined. If not, the find_library calls fail. I built ZeroMQ with a Visual Studio compiler, but not with the IDE. This leaves${CMAKE_VS_PLATFORM_TOOLSET}
empty. My ZeroMQ library is installed with the filename: libzmq-mt-gd-4_3_5.lib. The finder can't identify this.My non-azmq project is able to find ZeroMQ just fine, however, by relying on the ZeroMQConfig.cmake that is provided by ZeroMQ and installed alongside the library artifacts.
All it would take to fix this is to add a 3rd line in each of the NAMES section for Windows without the
${CMAKE_VS_PLATFORM_TOOLSET}-
to the FindZeroMQ.cmake provided in azmq.The text was updated successfully, but these errors were encountered: