forked from Nogesma/xrootd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathXrdMacaroons.cmake
54 lines (45 loc) · 1.59 KB
/
XrdMacaroons.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
#-------------------------------------------------------------------------------
# Modules
#-------------------------------------------------------------------------------
set( LIB_XRD_MACAROONS XrdMacaroons-${PLUGIN_VERSION} )
#-------------------------------------------------------------------------------
# Shared library version
#-------------------------------------------------------------------------------
if( BUILD_MACAROONS )
add_library(
${LIB_XRD_MACAROONS}
MODULE
XrdMacaroons/XrdMacaroons.cc
XrdMacaroons/XrdMacaroonsHandler.cc XrdMacaroons/XrdMacaroonsHandler.hh
XrdMacaroons/XrdMacaroonsAuthz.cc XrdMacaroons/XrdMacaroonsAuthz.hh
XrdMacaroons/XrdMacaroonsConfigure.cc)
target_link_libraries(
${LIB_XRD_MACAROONS}
PRIVATE
XrdHttpUtils
XrdUtils
XrdServer
uuid::uuid
${MACAROONS_LIB}
${JSON_LIBRARIES}
${XROOTD_HTTP_LIB}
OpenSSL::Crypto
${CMAKE_DL_LIBS})
target_include_directories(${LIB_XRD_MACAROONS}
PRIVATE ${MACAROONS_INCLUDES} ${JSON_INCLUDE_DIRS})
if( MacOSX )
SET( MACAROONS_LINK_FLAGS "-Wl")
else()
SET( MACAROONS_LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/src/XrdMacaroons/export-lib-symbols" )
endif()
set_target_properties(
${LIB_XRD_MACAROONS}
PROPERTIES
LINK_FLAGS "${MACAROONS_LINK_FLAGS}")
#-----------------------------------------------------------------------------
# Install
#-----------------------------------------------------------------------------
install(
TARGETS ${LIB_XRD_MACAROONS}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()