From 4f59b6eec3018b520b641aa5f8f6b80bda6a3521 Mon Sep 17 00:00:00 2001
From: Steven Murray <steven.murray@cern.ch>
Date: Tue, 15 Mar 2016 14:57:45 +0100
Subject: [PATCH] Added Findzeromq3

---
 cmake/Findzeromq3.cmake                   | 28 +++++++++++++++++++++++
 tapeserver/castor/messages/CMakeLists.txt |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 cmake/Findzeromq3.cmake

diff --git a/cmake/Findzeromq3.cmake b/cmake/Findzeromq3.cmake
new file mode 100644
index 0000000000..f8dfa56d13
--- /dev/null
+++ b/cmake/Findzeromq3.cmake
@@ -0,0 +1,28 @@
+# The CERN Tape Archive(CTA) project
+# Copyright(C) 2015  CERN
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This module will set the following variables:
+#     ZEROMQ3_FOUND
+#     ZEROMQ3_INCLUDE_DIRS
+
+find_path (ZEROMQ3_INCLUDE_DIRS
+  zmq.h
+  PATHS /usr/include
+  NO_DEFAULT_PATH)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(zeromq3 DEFAULT_MSG
+  ZEROMQ3_INCLUDE_DIRS)
diff --git a/tapeserver/castor/messages/CMakeLists.txt b/tapeserver/castor/messages/CMakeLists.txt
index e907f3150e..64b91feb94 100644
--- a/tapeserver/castor/messages/CMakeLists.txt
+++ b/tapeserver/castor/messages/CMakeLists.txt
@@ -24,6 +24,7 @@ include_directories(${PROJECT_SOURCE_DIR}/tapeserver)
 include_directories(${PROJECT_BINARY_DIR}/tapeserver)
 
 find_package(Protobuf REQUIRED)
+find_package(zeromq3 REQUIRED)
 
 file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.proto")
 PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${ProtoFiles})
-- 
GitLab