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 3, 2023
1 parent 4961d6d commit 31d6122
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cmake/XRootDDefaults.cmake
Expand Up @@ -29,7 +29,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 )
cmake_dependent_option( USE_SYSTEM_ISAL "Use isa-l installed in the system" FALSE "ENABLE_XRDEC" FALSE )
Expand Down
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
11 changes: 1 addition & 10 deletions src/CMakeLists.txt
Expand Up @@ -25,6 +25,7 @@ include( XrdSec )
include( XrdXml )
include( XrdHeaders )
include( XrdSecgsi )
include( XrdSecztn )

if( BUILD_KRB5 )
include( XrdSeckrb5 )
Expand All @@ -46,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 31d6122

Please sign in to comment.