Skip to content

Commit

Permalink
Adjust build rules to not depend on scitokenscpp to build libXrdSecztn
Browse files Browse the repository at this point in the history
This partially reverts commit 984efbc.
Actually, libXrdSecztn doesn't depend on scitokens-cpp, so we can always
build it even when -DENABLE_SCITOKENS=FALSE. Therefore, also remove the
conditional in the spec file to always include the plugin in xrootd-libs.
  • Loading branch information
amadio committed Mar 21, 2023
1 parent 354d0a9 commit d267b85
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion cmake/XRootDDefaults.cmake
Expand Up @@ -30,7 +30,7 @@ option( ENABLE_XRDEC "Enable erasure coding component."
option( ENABLE_ASAN "Enable adress sanitizer." FALSE )
option( ENABLE_TSAN "Enable thread sanitizer." FALSE )
option( ENABLE_XRDCLHTTP "Enable xrdcl-http plugin." TRUE )
option( ENABLE_SCITOKENS "Enable SciTokens plugin." TRUE )
cmake_dependent_option( ENABLE_SCITOKENS "Enable SciTokens plugin." TRUE "NOT XRDCL_ONLY" FALSE )
cmake_dependent_option( ENABLE_MACAROONS "Enable Macaroons plugin." TRUE "NOT XRDCL_ONLY" FALSE )
option( FORCE_ENABLED "Fail build if enabled components cannot be built." FALSE )
define_default( XRD_PYTHON_REQ_VERSION 3 )
2 changes: 0 additions & 2 deletions packaging/rhel/xrootd.spec.in
Expand Up @@ -883,9 +883,7 @@ fi
%{_libdir}/libXrdSecpwd-5.so
%{_libdir}/libXrdSecsss-5.so
%{_libdir}/libXrdSecunix-5.so
%if %{?_with_scitokens:1}%{!?_with_scitokens:0}
%{_libdir}/libXrdSecztn-5.so
%endif
%{_libdir}/libXrdUtils.so.3*
%{_libdir}/libXrdXml.so.3*

Expand Down
16 changes: 2 additions & 14 deletions src/CMakeLists.txt
Expand Up @@ -24,10 +24,8 @@ include( XrdPosix )
include( XrdSec )
include( XrdXml )
include( XrdHeaders )

if( BUILD_CRYPTO )
include( XrdSecgsi )
endif()
include( XrdSecgsi )
include( XrdSecztn )

if( BUILD_KRB5 )
include( XrdSeckrb5 )
Expand All @@ -49,23 +47,13 @@ if( BUILD_XRDEC )
add_subdirectory( XrdEc )
endif()

if( BUILD_SCITOKENS )
find_package( SciTokensCpp REQUIRED )
include_directories(
${SCITOKENS_CPP_INCLUDE_DIR}
XrdSciTokens/vendor/picojson
XrdSciTokens/vendor/inih )
include( XrdSecztn )
endif()

if( NOT XRDCL_ONLY )
include( XrdServer )
include( XrdDaemons )
include( XrdFrm )
include( XrdFfs )
include( XrdPlugins )
include( XrdSsi )

include( XrdPfc )

if( CMAKE_COMPILER_IS_GNUCXX )
Expand Down
7 changes: 7 additions & 0 deletions src/XrdSciTokens.cmake
@@ -1,10 +1,17 @@
include( XRootDCommon )

find_package( SciTokensCpp REQUIRED )

#-------------------------------------------------------------------------------
# Modules
#-------------------------------------------------------------------------------
set( LIB_XRD_SCITOKENS XrdAccSciTokens-${PLUGIN_VERSION} )

include_directories(
${SCITOKENS_CPP_INCLUDE_DIR}
XrdSciTokens/vendor/picojson
XrdSciTokens/vendor/inih )

#-------------------------------------------------------------------------------
# The XrdPfc library
#-------------------------------------------------------------------------------
Expand Down

0 comments on commit d267b85

Please sign in to comment.