1 # **************************************************************************
2 # * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
4 # * Author: The ALICE Off-line Project. *
5 # * Contributors are mentioned in the code where appropriate. *
7 # * Permission to use, copy, modify and distribute this software and its *
8 # * documentation strictly for non-commercial purposes is hereby granted *
9 # * without fee, provided that the above copyright notice appears in all *
10 # * copies and that both the copyright notice and this permission notice *
11 # * appear in the supporting documentation. The authors make no claims *
12 # * about the suitability of this software for any purpose. It is *
13 # * provided "as is" without express or implied warranty. *
14 # **************************************************************************
16 # Checks for a ZeroMQ installation
17 # ZeroMQ custom installation can be pointed using -DZEROMQ
18 # - ZEROMQ_INCLUDE_DIR - Where to find zeromq include sub-directory.
19 # - ZEROMQ_LIBRARIES - List of libraries when using zeromq.
20 # - ZEROMQ_FOUND - True if zeromq found.
22 message(STATUS "Checking for ZeroMQ ${ZEROMQ}")
24 set(ZEROMQ_FOUND FALSE)
27 # ZeroMQ is installed in a custom place
28 find_library(ZEROMQ_LIBRARIES NAMES zmq
34 find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.h zmq_utils.h zmq.hpp}
35 PATHS ${ZEROMQ}/include
37 DOC "Path to ZeroMQ include header files."
40 # Check is the library is installed on the system
41 find_library(ZEROMQ_LIBRARIES NAMES zmq
45 find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.hpp zmq_utils.h}
46 DOC "Path to ZeroMQ include header files."
50 set(ZEROMQ_DISABLED FALSE)
52 if(NOT ZEROMQ_LIBRARIES)
53 message(STATUS "ZeroMQ library not found. Disabling ZeroMQ support")
54 set(ZEROMQ_DISABLED TRUE)
57 if(NOT ZEROMQ_INCLUDE_DIR AND NOT ZEROMQ_DISABLED)
58 message(STATUS "ZeroMQ headers not found. Please install development package + cppzmq interface. Disabling ZeroMQ support")
59 set(ZEROMQ_DISABLED TRUE)
62 if(ZEROMQ_LIBRARIES AND ZEROMQ_INCLUDE_DIR)
63 message(STATUS "Found ZeroMQ ${ZEROMQ_LIBRARIES}")
64 set(ZEROMQ_FOUND TRUE)
68 add_definitions(-DZMQ)