ATO-18, ATO-19, PWGPP-102, ALIROOT-5603 - Separate dNdx:bg MC parameterization and...
[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.
20# - ZEROMQ_LIBRARIES_STATIC - List of static libraries when using zeromq.
21# - ZEROMQ_FOUND - True if zeromq found.
22
23message(STATUS "Checking for ZeroMQ ${ZEROMQ}")
24
25set(ZEROMQ_FOUND FALSE)
26
27if(ZEROMQ)
28 # ZeroMQ is installed in a custom place
29 find_library(ZEROMQ_LIBRARIES NAMES zmq
30 PATH ${ZEROMQ}/lib
31 NO_DEFAULT_PATH
32 DOC "Path to libzmq)"
33 )
34
35 find_library(ZEROMQ_LIBRARIES_STATIC NAMES libzmq.a
36 PATH ${ZEROMQ}/lib
37 NO_DEFAULT_PATH
38 DOC "Path to libzmq)"
39 )
40
41 find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.hh zmq_utils.h}
42 PATHS ${ZEROMQ}/include
43 NO_DEFAULT_PATH
44 DOC "Path to ZeroMQ include header files."
45 )
46else(ZEROMQ)
47 # Check is the library is installed on the system
48 find_library(ZEROMQ_LIBRARIES NAMES zmq
49 DOC "Path to libzmq)"
50 )
51
52 find_library(ZEROMQ_LIBRARIES_STATIC NAMES libzmq.a
53 DOC "Path to libzmq)"
54 )
55
56 find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.hpp zmq_utils.h}
57 DOC "Path to ZeroMQ include header files."
58 )
59endif(ZEROMQ)
60
61set(ZEROMQ_DISABLED FALSE)
62
63if(NOT ZEROMQ_LIBRARIES)
64 message(STATUS "ZeroMQ library not found. Disabling ZeroMQ support")
65 set(ZEROMQ_DISABLED TRUE)
66endif()
67
68if(NOT ZEROMQ_LIBRARIES_STATIC AND NOT ZEROMQ_DISABLED)
69 message(STATUS "ZeroMQ static library not found. Disabling ZeroMQ support")
70 set(ZEROMQ_DISABLED TRUE)
71endif()
72
73if(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)
76endif()
77
78if(ZEROMQ_LIBRARIES AND ZEROMQ_LIBRARIES_STATIC AND ZEROMQ_INCLUDE_DIR)
79 message(STATUS "Found ZeroMQ ${ZEROMQ_LIBRARIES}")
80 set(ZEROMQ_FOUND TRUE)
81endif()
82
83
7e0cf530 84
85