CMake: removing qpythia from the depedencies
[u/mrichter/AliRoot.git] / cmake / FindZeroMQ.cmake
CommitLineData
bf49318a 1# **************************************************************************
2# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
3# * *
4# * Author: The ALICE Off-line Project. *
5# * Contributors are mentioned in the code where appropriate. *
6# * *
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# **************************************************************************
15
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.
bf49318a 20# - ZEROMQ_FOUND - True if zeromq found.
21
22message(STATUS "Checking for ZeroMQ ${ZEROMQ}")
23
24set(ZEROMQ_FOUND FALSE)
25
26if(ZEROMQ)
27 # ZeroMQ is installed in a custom place
28 find_library(ZEROMQ_LIBRARIES NAMES zmq
ffd80684 29 PATHS ${ZEROMQ}/lib
bf49318a 30 NO_DEFAULT_PATH
31 DOC "Path to libzmq)"
32 )
33
ffd80684 34 find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.h zmq_utils.h zmq.hpp}
bf49318a 35 PATHS ${ZEROMQ}/include
36 NO_DEFAULT_PATH
37 DOC "Path to ZeroMQ include header files."
38 )
39else(ZEROMQ)
40 # Check is the library is installed on the system
41 find_library(ZEROMQ_LIBRARIES NAMES zmq
42 DOC "Path to libzmq)"
43 )
44
bf49318a 45 find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.hpp zmq_utils.h}
46 DOC "Path to ZeroMQ include header files."
47 )
48endif(ZEROMQ)
49
50set(ZEROMQ_DISABLED FALSE)
51
52if(NOT ZEROMQ_LIBRARIES)
53 message(STATUS "ZeroMQ library not found. Disabling ZeroMQ support")
54 set(ZEROMQ_DISABLED TRUE)
55endif()
56
bf49318a 57if(NOT ZEROMQ_INCLUDE_DIR AND NOT ZEROMQ_DISABLED)
ffd80684 58 message(STATUS "ZeroMQ headers not found. Please install development package + cppzmq interface. Disabling ZeroMQ support")
bf49318a 59 set(ZEROMQ_DISABLED TRUE)
60endif()
61
eb410947 62if(ZEROMQ_LIBRARIES AND ZEROMQ_INCLUDE_DIR)
bf49318a 63 message(STATUS "Found ZeroMQ ${ZEROMQ_LIBRARIES}")
64 set(ZEROMQ_FOUND TRUE)
65endif()
66
fb6525e0 67if(ZEROMQ_FOUND)
68 add_definitions(-DZMQ)
69ENDIF(ZEROMQ_FOUND)
7e0cf530 70
71