]> git.uio.no Git - u/mrichter/AliRoot.git/blame - cmake/FindZeroMQ.cmake
Protections added.
[u/mrichter/AliRoot.git] / cmake / FindZeroMQ.cmake
CommitLineData
7e0cf530 1# Copyright (c) 2010-2011 Phorm, Inc.
2# License: GNU LGPL v 3.0, see http://www.gnu.org/licenses/lgpl-3.0-standalone.html
3# Author: Andrey Skryabin <andrew@zmqmessage.org>, et al.
4
5# - Find 0mq
6# Find the zeromq includes and library
7#
8# ZEROMQ_INCLUDE_DIR - Where to find zeromq include sub-directory.
9# ZEROMQ_LIBRARIES - List of libraries when using zeromq.
10# ZEROMQ_FOUND - True if zeromq found.
11
12IF (ZEROMQ_INCLUDE_DIR)
13 # Already in cache, be silent.
14 SET(ZEROMQ_FIND_QUIETLY TRUE)
15ENDIF (ZEROMQ_INCLUDE_DIR)
16
17FIND_PATH(ZEROMQ_INCLUDE_DIR zmq.hpp)
18
19SET(ZEROMQ_NAMES zmq)
20FIND_LIBRARY(ZEROMQ_LIBRARY NAMES ${ZEROMQ_NAMES} )
21
22# Handle the QUIETLY and REQUIRED arguments and set ZEROMQ_FOUND to
23# TRUE if all listed variables are TRUE.
24INCLUDE(FindPackageHandleStandardArgs)
25FIND_PACKAGE_HANDLE_STANDARD_ARGS(
26 ZEROMQ DEFAULT_MSG
27 ZEROMQ_LIBRARY ZEROMQ_INCLUDE_DIR
28)
29
30IF(ZEROMQ_FOUND)
31 SET( ZEROMQ_LIBRARIES ${ZEROMQ_LIBRARY} )
32ELSE(ZEROMQ_FOUND)
33 SET( ZEROMQ_LIBRARIES )
34ENDIF(ZEROMQ_FOUND)
35
36