Skip to content

Commit

Permalink
[XrdClHttp] Move to xrootd core.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal committed Apr 25, 2022
1 parent dd6fd8a commit 9db73ec
Show file tree
Hide file tree
Showing 26 changed files with 1,925 additions and 4 deletions.
23 changes: 23 additions & 0 deletions cmake/FindDavix.cmake
@@ -0,0 +1,23 @@
find_path(
Davix_INCLUDE_DIRS
NAMES davix/davix.hpp
HINTS ${Davix_INCLUDE_DIRS}
)

find_library(
Davix_LIBRARIES
NAMES davix
HINTS ${Davix_LIBRARY_DIRS}
)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
Davix
DEFAULT_MSG
Davix_LIBRARIES
Davix_INCLUDE_DIRS
)

if(Davix_FOUND)
mark_as_advanced(Davix_LIBRARIES Davix_INCLUDE_DIRS)
endif()
1 change: 1 addition & 0 deletions cmake/XRootDDefaults.cmake
Expand Up @@ -27,4 +27,5 @@ option( ENABLE_VOMS "Enable VOMS plug-in if possible."
option( ENABLE_XRDEC "Enable erasure coding component." FALSE )
option( ENABLE_ASAN "Enable adress sanitizer." FALSE )
option( ENABLE_OPENSSL3 "Enable openssl3 support." TRUE )
option( ENABLE_XRDCLHTTP "Enable xrdcl-http plugin." FALSE )
define_default( XRD_PYTHON_REQ_VERSION 2.4 )
4 changes: 4 additions & 0 deletions cmake/XRootDFindLibs.cmake
Expand Up @@ -145,3 +145,7 @@ if( ENABLE_VOMS AND (LINUX OR KFREEBSD OR Hurd) )
set( BUILD_VOMS FALSE )
endif()
endif()

if( ENABLE_XRDCLHTTP )
find_package( Davix REQUIRED )
endif()
2 changes: 1 addition & 1 deletion packaging/debian/rules
Expand Up @@ -6,7 +6,7 @@ export PYBUILD_NAME=xrootd
dh $@ --builddirectory=build --destdir=deb_packages --with python3

override_dh_auto_configure:
dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_LIBDIR=lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_SKIP_INSTALL_RPATH=ON -DXRDCLHTTP_SUBMODULE=TRUE
dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_LIBDIR=lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_SKIP_INSTALL_RPATH=ON -DENABLE_XRDCLHTTP=TRUE

override_dh_install:
install -D -m 644 packaging/common/client.conf deb_packages/etc/xrootd/client.conf
Expand Down
4 changes: 2 additions & 2 deletions packaging/rhel/xrootd.spec.in
Expand Up @@ -557,7 +557,7 @@ cmake \
-DXRDCEPH_SUBMODULE=TRUE \
%endif
%if %{?_with_xrdclhttp:1}%{!?_with_xrdclhttp:0}
-DXRDCLHTTP_SUBMODULE=TRUE \
-DENABLE_XRDCLHTTP=TRUE \
%endif
%if %{?_with_isal:1}%{!?_with_isal:0}
-DENABLE_XRDEC=TRUE \
Expand Down Expand Up @@ -597,7 +597,7 @@ cmake \
-DXRDCEPH_SUBMODULE=TRUE \
%endif
%if %{?_with_xrdclhttp:1}%{!?_with_xrdclhttp:0}
-DXRDCLHTTP_SUBMODULE=TRUE \
-DENABLE_XRDEC=TRUE \
%endif
../

Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Expand Up @@ -40,7 +40,7 @@ if( ENABLE_XRDCL )
add_subdirectory( XrdCl )
endif()

if( XRDCLHTTP_SUBMODULE )
if( ENABLE_XRDCLHTTP )
add_subdirectory( XrdClHttp )
endif()

Expand Down
16 changes: 16 additions & 0 deletions src/XrdClHttp/CMakeLists.txt
@@ -0,0 +1,16 @@
include_directories(${Davix_INCLUDE_DIRS}/davix)

set(libXrdClHttp_sources
XrdClHttpPlugInFactory.cc
XrdClHttpPlugInUtil.cc
XrdClHttpFilePlugIn.cc
XrdClHttpFileSystemPlugIn.cc
XrdClHttpPosix.cc)

set(PLUGIN_NAME "XrdClHttp-${PLUGIN_VERSION}")

add_library(${PLUGIN_NAME} MODULE ${libXrdClHttp_sources})

target_link_libraries(${PLUGIN_NAME} ${Davix_LIBRARIES} XrdCl)

install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

0 comments on commit 9db73ec

Please sign in to comment.