CMakeLists.txt 2.19 KB
Newer Older
1
# The CERN Tape Archive (CTA) project
2
# Copyright 2018 CERN
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# 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/>.
16

17
cmake_minimum_required (VERSION 2.6)
18

19
20
21
find_package(xrootd REQUIRED)
find_package(Protobuf3 REQUIRED)

22
include_directories(${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR})
23
include_directories(${CMAKE_SOURCE_DIR}/tapeserver)
24

25
26
27
#
# XRootD SSI Protocol Buffer bindings
#
28
include_directories(${XRD_SSI_PB_DIR}/include ${XRD_SSI_PB_DIR}/eos_cta/include)
29

30
31
32
#
# Compiled protocol buffers
#
33
include_directories(${CMAKE_BINARY_DIR}/eos_cta ${PROTOBUF3_INCLUDE_DIRS})
34

35
36
37
#
# XRootD SSI plugin for CTA Frontend
#
38
39
add_library(XrdSsiCta MODULE XrdSsiCtaServiceProvider.cpp XrdSsiCtaRequestProc.cpp XrdSsiCtaRequestMessage.cpp
                             ../cmdline/CtaAdminCmdParse.cpp
40
                             GrpcClient.cpp GrpcEndpoint.cpp)
41
target_link_libraries(XrdSsiCta ${XROOTD_XRDSSI_LIB} XrdSsiLib XrdSsiPbEosCta ctascheduler ctacommon ctaobjectstore ctacatalogue
42
                      EosMigration ${GRPC_LIBRARY} ${GRPC_GRPC++_LIBRARY})
43
44
45
46
47
48
49
50
set_property (TARGET XrdSsiCta APPEND PROPERTY INSTALL_RPATH ${PROTOBUF3_RPATH})
if (OCCI_SUPPORT)
  set_property (TARGET XrdSsiCta APPEND PROPERTY INSTALL_RPATH ${ORACLE-INSTANTCLIENT_RPATH})
endif (OCCI_SUPPORT)

install(TARGETS XrdSsiCta DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
install(FILES cta-frontend-xrootd.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cta)
install(FILES cta-frontend.logrotate DESTINATION /etc/logrotate.d RENAME cta-frontend)
51
install(FILES cta-frontend.sysconfig DESTINATION /etc/sysconfig RENAME cta-frontend)
52
install(FILES cta-frontend.service DESTINATION /etc/systemd/system)