/
CMakeLists.txt
113 lines (94 loc) · 3.54 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# BAREOS�� - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2017 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
# License as published by the Free Software Foundation and included
# in the file LICENSE.
#
# 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
# Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
IF(HAVE_WIN32)
include_directories(
${CMAKE_SOURCE_DIR}/src/win32
${CMAKE_SOURCE_DIR}/src/win32/include
${CMAKE_SOURCE_DIR}/src/win32/filed
${CMAKE_SOURCE_DIR}/src/win32/plugins/filed
${CMAKE_SOURCE_DIR}/src/win32/compat/include
${CMAKE_SOURCE_DIR}/src/win32/vdi/include
${CMAKE_SOURCE_DIR}/src/win32/plugins/python/include
${CMAKE_SOURCE_DIR}/src/include
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/filed
${CMAKE_SOURCE_DIR}/src/plugins/filed
)
link_directories(${CMAKE_SOURCE_DIR}/src/win32/plugins/python/lib/${WINDOWS_BITS})
add_definitions(-DMS_WIN${WINDOWS_BITS})
ELSE()
include_directories(../.. . ../../include ../../filed /usr/include/python2.7)
ENDIF()
#set(DLLIBS dl)
add_library(bpipe-fd MODULE bpipe-fd.cc)
set_target_properties(bpipe-fd PROPERTIES PREFIX "")
INSTALL(TARGETS bpipe-fd DESTINATION ${plugindir})
IF(HAVE_WIN32)
target_link_libraries(bpipe-fd bareos)
ENDIF()
IF(HAVE_WIN32)
add_library(mssqlvdi-fd MODULE ../../win32/plugins/filed/mssqlvdi-fd.cc)
target_compile_options(mssqlvdi-fd PUBLIC -fpermissive)
set_target_properties(mssqlvdi-fd PROPERTIES PREFIX ""
DEFINE_SYMBOL "BUILDING_DLL"
)
INSTALL(TARGETS mssqlvdi-fd DESTINATION ${plugindir})
target_link_libraries(mssqlvdi-fd bareos)
ENDIF()
if(${HAVE_CEPHFS})
add_library(cephfs-fd MODULE cephfs-fd.cc)
set_target_properties(cephfs-fd PROPERTIES PREFIX "")
INSTALL(TARGETS cephfs-fd DESTINATION ${plugindir})
endif()
if(${HAVE_CEPH_RADOS})
add_library(rados-fd MODULE rados-fd.cc)
set_target_properties(rados-fd PROPERTIES PREFIX "")
INSTALL(TARGETS rados-fd DESTINATION ${plugindir})
endif()
IF(NOT HAVE_WIN32)
add_library(example-plugin-fd MODULE example-plugin-fd.cc)
set_target_properties(example-plugin-fd PROPERTIES PREFIX "")
ENDIF()
add_library(python-fd MODULE python-fd.cc)
set_target_properties(python-fd PROPERTIES PREFIX "")
INSTALL(TARGETS python-fd DESTINATION ${plugindir})
IF(HAVE_WIN32)
target_link_libraries(python-fd python27 bareos)
ENDIF()
if(${HAVE_GLUSTERFS})
add_library(gfapi-fd MODULE gfapi-fd.cc)
set_target_properties(gfapi-fd PROPERTIES PREFIX "")
INSTALL(TARGETS gfapi-fd DESTINATION ${plugindir})
endif()
set (PYFILES
bareos-fd.py.template
bareos-fd-local-fileset.py
bareos-fd-mock-test.py
BareosFdPluginBaseclass.py
BareosFdPluginLocalFileset.py
BareosFdWrapper.py
bareos_fd_consts.py
bareos-fd-ldap.py
BareosFdPluginLDAP.py
)
INSTALL(FILES ${PYFILES} DESTINATION ${plugindir})
#add_library(test-plugin-fd MODULE test-plugin-fd.cc)
## do not prefix with "lib"
#set_target_properties(test-plugin-fd PROPERTIES PREFIX "")
#INSTALL(TARGETS test-plugin-fd DESTINATION ${plugindir})