CMakeLists.txt 1.54 KB
Newer Older
1
cmake_minimum_required (VERSION 2.6)
2

3
# Old CASTOR's tapeserverd daemon code
4
add_subdirectory (castor)
5
6
7

# CTA's cta-taped code
add_subdirectory (daemon)
8
add_subdirectory (session)
9
10
# The tape session's threads are in a separate directory (session, but compiled
# from the previous one to create a single library).
11

12
include_directories (${PROTOBUF3_INCLUDE_DIRS})
13
add_executable (cta-taped cta-taped.cpp)
14
find_package(Protobuf3 REQUIRED)
15
target_link_libraries(cta-taped
16
  ctatapedaemon ctacommon ${PROTOBUF3_LIBRARIES})
17
18
19
20
21
if (OCCI_SUPPORT)
  set_target_properties(cta-taped PROPERTIES INSTALL_RPATH "${ORACLE-INSTANTCLIENT_RPATH};${PROTOBUF3_RPATH}")
else (OCCI_SUPPORT)
  set_target_properties(cta-taped PROPERTIES INSTALL_RPATH ${PROTOBUF3_RPATH})
endif (OCCI_SUPPORT)
22
install (TARGETS cta-taped DESTINATION usr/bin)
23
install (FILES TPCONFIG.example DESTINATION /etc/cta)
24
25
install (FILES cta-taped.1cta DESTINATION /usr/share/man/man1)
install (FILES cta-taped.logrotate DESTINATION /etc/logrotate.d RENAME cta-taped)
26
27
install (FILES cta-taped.sysconfig DESTINATION /etc/sysconfig RENAME cta-taped)
install (FILES cta-taped.service DESTINATION /etc/systemd/system)
28
29
30
31

# CTA's cta-taped system tests.
add_library(cta-tapedSystemTests SHARED
  cta-tapedSystemtests.cpp)
Michael Davis's avatar
Michael Davis committed
32
33
set_property(TARGET cta-tapedSystemTests PROPERTY SOVERSION "${CTA_SOVERSION}")
set_property(TARGET cta-tapedSystemTests PROPERTY   VERSION "${CTA_LIBVERSION}")
34
35

target_link_libraries(cta-tapedSystemTests
36
  unitTestHelper
37
38
  ctacommon)

39
install(TARGETS cta-tapedSystemTests DESTINATION usr/${CMAKE_INSTALL_LIBDIR})