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_LIBRARIES_STATIC - List of static libraries when using zeromq.
21 # - ZEROMQ_FOUND - True if zeromq found.
23 message(STATUS "Checking for ZeroMQ ${ZEROMQ}")
25 set(ZEROMQ_FOUND FALSE)
28 # ZeroMQ is installed in a custom place
29 find_library(ZEROMQ_LIBRARIES NAMES zmq
35 find_library(ZEROMQ_LIBRARIES_STATIC NAMES libzmq.a
41 find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.hh zmq_utils.h}
42 PATHS ${ZEROMQ}/include
44 DOC "Path to ZeroMQ include header files."
47 # Check is the library is installed on the system
48 find_library(ZEROMQ_LIBRARIES NAMES zmq
52 find_library(ZEROMQ_LIBRARIES_STATIC NAMES libzmq.a
56 find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.hpp zmq_utils.h}
57 DOC "Path to ZeroMQ include header files."
61 set(ZEROMQ_DISABLED FALSE)
63 if(NOT ZEROMQ_LIBRARIES)
64 message(STATUS "ZeroMQ library not found. Disabling ZeroMQ support")
65 set(ZEROMQ_DISABLED TRUE)
68 if(NOT ZEROMQ_LIBRARIES_STATIC AND NOT ZEROMQ_DISABLED)
69 message(STATUS "ZeroMQ static library not found. Disabling ZeroMQ support")
70 set(ZEROMQ_DISABLED TRUE)
73 if(NOT ZEROMQ_INCLUDE_DIR AND NOT ZEROMQ_DISABLED)
74 message(STATUS "ZeroMQ headers not found. Please install development package. Disabling ZeroMQ support")
75 set(ZEROMQ_DISABLED TRUE)
78 if(ZEROMQ_LIBRARIES AND ZEROMQ_LIBRARIES_STATIC AND ZEROMQ_INCLUDE_DIR)
79 message(STATUS "Found ZeroMQ ${ZEROMQ_LIBRARIES}")
80 set(ZEROMQ_FOUND TRUE)