From 7efca42e7dd3ea8071437da4f600873499e42c0a Mon Sep 17 00:00:00 2001
From: Steven Murray <steven.murray@cern.ch>
Date: Tue, 15 Mar 2016 15:04:32 +0100
Subject: [PATCH] Added Findopenssl

---
 cmake/Findopenssl.cmake                   | 28 +++++++++++++++++++++++
 tapeserver/castor/messages/CMakeLists.txt | 24 +++++++++----------
 2 files changed, 39 insertions(+), 13 deletions(-)
 create mode 100644 cmake/Findopenssl.cmake

diff --git a/cmake/Findopenssl.cmake b/cmake/Findopenssl.cmake
new file mode 100644
index 0000000000..db1adbe3b3
--- /dev/null
+++ b/cmake/Findopenssl.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:
+#     OPENSSL_FOUND
+#     OPENSSL_INCLUDE_DIRS
+
+find_path (OPENSSL_INCLUDE_DIRS
+  openssl/rsa.h
+  PATHS /usr/include
+  NO_DEFAULT_PATH)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(openssl DEFAULT_MSG
+  OPENSSL_INCLUDE_DIRS)
diff --git a/tapeserver/castor/messages/CMakeLists.txt b/tapeserver/castor/messages/CMakeLists.txt
index 64b91feb94..28a997cc59 100644
--- a/tapeserver/castor/messages/CMakeLists.txt
+++ b/tapeserver/castor/messages/CMakeLists.txt
@@ -1,28 +1,26 @@
-# This file is part of the Castor project.
-# See http://castor.web.cern.ch/castor
+# 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.
 #
-# Copyright (C) 2003  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 2
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#
-# @author Castor Dev team, castor-dev@cern.ch
 #
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 cmake_minimum_required (VERSION 2.6)
 
 include_directories(/usr/include/shift)
 include_directories(${PROJECT_SOURCE_DIR}/tapeserver)
 include_directories(${PROJECT_BINARY_DIR}/tapeserver)
 
+find_package(openssl REQUIRED)
 find_package(Protobuf REQUIRED)
 find_package(zeromq3 REQUIRED)
 
-- 
GitLab