-
Notifications
You must be signed in to change notification settings - Fork 149
/
XRootDFindLibs.cmake
144 lines (125 loc) · 3.07 KB
/
XRootDFindLibs.cmake
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#-------------------------------------------------------------------------------
# Find the required libraries
#-------------------------------------------------------------------------------
find_package( ZLIB REQUIRED)
find_package( LibUuid REQUIRED )
if( ENABLE_READLINE )
find_package( Readline )
if( READLINE_FOUND )
add_definitions( -DHAVE_READLINE )
else()
set( READLINE_LIBRARY "" )
set( NCURSES_LIBRARY "" )
endif()
endif()
if( ZLIB_FOUND )
add_definitions( -DHAVE_LIBZ )
endif()
find_package( TinyXml )
find_package( LibXml2 )
if( LIBXML2_FOUND )
add_definitions( -DHAVE_XML2 )
endif()
find_package( Systemd )
if( SYSTEMD_FOUND )
add_definitions( -DHAVE_SYSTEMD )
endif()
find_package( CURL )
if( ENABLE_CRYPTO )
find_package( OpenSSL )
if( OPENSSL_FOUND )
add_definitions( -DHAVE_XRDCRYPTO )
add_definitions( -DHAVE_SSL )
set( BUILD_CRYPTO TRUE )
else()
set( BUILD_CRYPTO FALSE )
endif()
endif()
if( ENABLE_KRB5 )
find_package( Kerberos5 )
if( KERBEROS5_FOUND )
set( BUILD_KRB5 TRUE )
else()
set( BUILD_KRB5 FALSE )
endif()
endif()
# mac fuse not supported
if( ENABLE_FUSE AND (LINUX OR KFREEBSD) )
find_package( fuse )
if( FUSE_FOUND )
add_definitions( -DHAVE_FUSE )
set( BUILD_FUSE TRUE )
else()
set( BUILD_FUSE FALSE )
endif()
endif()
if( ENABLE_TESTS )
find_package( CPPUnit )
if( CPPUNIT_FOUND )
set( BUILD_TESTS TRUE )
else()
set( BUILD_TESTS FALSE )
endif()
endif()
if( ENABLE_HTTP )
if( OPENSSL_FOUND AND BUILD_CRYPTO )
set( BUILD_HTTP TRUE )
if( CURL_FOUND )
set( BUILD_TPC TRUE )
else()
set( BUILD_TPC FALSE )
endif()
else()
set( BUILD_HTTP FALSE )
set( BUILD_TPC FALSE )
endif()
endif()
if( BUILD_TPC )
set ( CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARIES} )
check_function_exists( curl_multi_wait HAVE_CURL_MULTI_WAIT )
compiler_define_if_found( HAVE_CURL_MULTI_WAIT HAVE_CURL_MULTI_WAIT )
endif()
find_package( Macaroons )
include (FindPkgConfig)
pkg_check_modules(JSON json-c)
pkg_check_modules(UUID uuid)
if( MACAROONS_FOUND AND JSON_FOUND AND UUID_FOUND )
set( BUILD_MACAROONS TRUE )
else()
set( BUILD_MACAROONS FALSE )
endif()
find_package( SciTokensCpp )
if( SCITOKENSCPP_FOUND )
set( BUILD_SCITOKENS TRUE )
else()
set( BUILD_SCITOKENS FALSE )
endif()
if( ENABLE_XRDEC )
find_package( Yasm )
find_package( LibTool )
find_package( AutoMake )
find_package( AutoConf )
if( YASM_FOUND AND LIBTOOL_FOUND AND AUTOMAKE_FOUND AND AUTOCONF_FOUND )
set( BUILD_XRDEC TRUE )
else()
set( BUILD_XRDEC FALSE )
endif()
endif()
if( ENABLE_PYTHON AND (LINUX OR KFREEBSD OR Hurd OR MacOSX) )
find_package( PythonInterp ${XRD_PYTHON_REQ_VERSION} )
find_package( PythonLibs ${XRD_PYTHON_REQ_VERSION} )
if( PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND )
set( BUILD_PYTHON TRUE )
set( PYTHON_FOUND TRUE )
else()
set( BUILD_PYTHON FALSE )
endif()
endif()
if( ENABLE_VOMS AND (LINUX OR KFREEBSD OR Hurd) )
find_package( VOMS )
if( VOMS_FOUND )
set( BUILD_VOMS TRUE )
else()
set( BUILD_VOMS FALSE )
endif()
endif()