Skip to content

Commit

Permalink
Add version reporting to FindZeroMQ
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Mar 25, 2020
1 parent 54f5fea commit adf6165
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions cmake/Modules/FindZeroMQ.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ pkg_check_modules(PC_LIBZMQ QUIET libzmq)
set(ZeroMQ_VERSION ${PC_LIBZMQ_VERSION})

find_path(ZeroMQ_INCLUDE_DIR zmq.h
PATHS ${ZeroMQ_DIR}/include
${PC_LIBZMQ_INCLUDE_DIRS})
PATHS
${ZeroMQ_DIR}/include
${PC_LIBZMQ_INCLUDE_DIRS})

find_library(ZeroMQ_LIBRARY
NAMES zmq
PATHS ${ZeroMQ_DIR}/lib
${PC_LIBZMQ_LIBDIR}
${PC_LIBZMQ_LIBRARY_DIRS})
NAMES zmq
PATHS
${ZeroMQ_DIR}/lib
${PC_LIBZMQ_LIBDIR}
${PC_LIBZMQ_LIBRARY_DIRS})

if(ZeroMQ_LIBRARY)
set(ZeroMQ_FOUND ON)
Expand All @@ -31,4 +33,9 @@ endif()
include ( FindPackageHandleStandardArgs )
# handle the QUIETLY and REQUIRED arguments and set ZMQ_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args ( ZeroMQ DEFAULT_MSG ZeroMQ_LIBRARIES ZeroMQ_INCLUDE_DIRS )
find_package_handle_standard_args(ZeroMQ
REQUIRED_VARS
ZeroMQ_LIBRARIES
ZeroMQ_INCLUDE_DIRS
VERSION_VAR
ZeroMQ_VERSION)

0 comments on commit adf6165

Please sign in to comment.