Skip to content
Snippets Groups Projects
Commit 58c875b5 authored by Pere Mato Vila's avatar Pere Mato Vila
Browse files

Implemented globus option to CMake build

parent 158299cd
No related branches found
No related tags found
No related merge requests found
# - Locate Globus libraries
# Defines:
#
# GLOBUS_FOUND
# GLOBUS_INCLUDE_DIR
# GLOBUS_INCLUDE_DIRS (not cached)
# GLOBUS_LIBRARIES (not cached)
# GLOBUS_xxx_LIBRARY
find_path(GLOBUS_INCLUDE_DIR NAMES globus_common.h
HINTS ${GLOBUS_DIR}/include $ENV{GLOBUS_LOCATION}/include
/opt/globus/include
PATH_SUFFIXES gcc32 gcc32dbg gcc32pthr gcc32dbgpthr
gcc64 gcc64dbg gcc64pthr gcc64dbgpthr globus)
if(GLOBUS_INCLUDE_DIR)
get_filename_component(flavour ${GLOBUS_INCLUDE_DIR} NAME)
endif()
set(GLOBUS_INCLUDE_DIRS ${GLOBUS_INCLUDE_DIR})
set(libraries gssapi_gsi gss_assist gsi_credential common gsi_callback proxy_ssl
gsi_sysconfig openssl_error oldgaa gsi_cert_utils
openssl gsi_proxy_core callout)
foreach( lib ${libraries})
find_library(GLOBUS_${lib}_LIBRARY NAMES globus_${lib}_${flavour} HINTS
${GLOBUS_DIR}/lib $ENV{GLOBUS_LOCATION}/lib)
if(GLOBUS_${lib}_LIBRARY)
set(GLOBUS_${lib}_FOUND 1)
list(APPEND GLOBUS_LIBRARIES ${GLOBUS_${lib}_LIBRARY})
mark_as_advanced(GLOBUS_${lib}_LIBRARY)
endif()
endforeach()
# handle the QUIETLY and REQUIRED arguments and set GLOBUS_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLOBUS DEFAULT_MSG GLOBUS_INCLUDE_DIR GLOBUS_common_LIBRARY)
mark_as_advanced(GLOBUS_FOUND GLOBUS_INCLUDE_DIR)
......@@ -675,9 +675,22 @@ if(ldap)
endif()
endif()
#---Check for globus--------------------------------------------------------------------
if(globus)
find_package(Globus)
if(NOT GLOBUS_FOUND)
if(fail-on-missing)
message(FATAL_ERROR "globus libraries not found and is required ('globus' option enabled)")
else()
message(STATUS "globus libraries not found. Set environment var GLOBUS_LOCATION or varibale GLOBUS_DIR to point to your globus installation")
message(STATUS "For the time being switching OFF 'globus' option")
set(globus OFF CACHE BOOL "" FORCE)
endif()
endif()
endif()
#---Report non implemented options---------------------------------------------------
foreach(opt afs chirp clarens cling glite globus hdfs lzma pch peac sapdb srp)
foreach(opt afs chirp clarens glite hdfs pch peac sapdb srp)
if(${opt})
message(STATUS ">>> Option '${opt}' not implemented yet! Signal your urgency to pere.mato@cern.ch")
set(${opt} OFF CACHE BOOL "" FORCE)
......
add_subdirectory(net)
add_subdirectory(auth) # special CMakeListst.txt
......@@ -27,3 +28,6 @@ if(ldap)
add_subdirectory(ldap)
endif()
if(globus)
add_subdirectory(globusauth)
endif()
\ No newline at end of file
############################################################################
# CMakeLists.txt file for building ROOT net/globusauth package
############################################################################
ROOT_USE_PACKAGE(net/net)
ROOT_USE_PACKAGE(net/auth)
include_directories(${GLOBUS_INCLUDE_DIRS})
ROOT_LINKER_LIBRARY(GlobusAuth *.cxx LIBRARIES Core ${GLOBUS_LIBRARIES} ${OPENSSL_LIBRARIES} DEPENDENCIES RootAuth Net)
ROOT_INSTALL_HEADERS()
......@@ -9,7 +9,12 @@ ROOT_USE_PACKAGE(net/auth)
ROOT_GLOB_SOURCES(rpdutilsrcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cxx)
list(REMOVE_ITEM rpdutilsrcs src/rpdpriv.cxx src/rpdconn.cxx)
if(GLOBUS_FOUND)
if(globus)
add_definitions(-DR__GLBS)
include_directories(${GLOBUS_INCLUDE_DIRS})
if(GLOBUS_gsi_credential_FOUND)
add_definitions(-DR__GLBS22)
endif()
else()
list(REMOVE_ITEM rpdutilsrcs src/globus.cxx)
endif()
......@@ -22,7 +27,7 @@ endif()
#---static library needed for rootd and proofd --------------------------------------------
add_library(rpdutil STATIC ${rpdutilsrcs})
ROOT_LINKER_LIBRARY(SrvAuth rpdutils.cxx ssh.cxx LIBRARIES rpdutil rsa ${CRYPTLIBS} DEPENDENCIES Net)
ROOT_LINKER_LIBRARY(SrvAuth rpdutils.cxx ssh.cxx LIBRARIES rpdutil rsa ${CRYPTLIBS} ${GLOBUS_LIBRARIES} ${OPENSSL_LIBRARIES} DEPENDENCIES Net)
......@@ -14,7 +14,7 @@ if(WIN32)
ROOT_LINKER_LIBRARY(XrdProofd XProofProtUtils.cxx LIBRARIES ${XROOTD_LIBRARIES})
else()
ROOT_EXECUTABLE(proofd proofd.cxx ${CMAKE_SOURCE_DIR}/core/clib/src/strlcat.c
LIBRARIES ${XROOTD_LIBRARIES} rpdutil rsa ${OPENSSL_LIBRARIES} ${CRYPTLIBS} )
LIBRARIES ${XROOTD_LIBRARIES} rpdutil rsa ${GLOBUS_LIBRARIES} ${OPENSSL_LIBRARIES} ${CRYPTLIBS} )
ROOT_EXECUTABLE(xproofd X*.cxx ${CMAKE_SOURCE_DIR}/net/rpdutils/src/rpdconn.cxx
LIBRARIES ${XROOTD_LIBRARIES} ${SYSLIBS})
ROOT_LINKER_LIBRARY(XrdProofd X*.cxx ${CMAKE_SOURCE_DIR}/net/rpdutils/src/rpdconn.cxx
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment