Skip to content

Commit

Permalink
fixup! [CMake] Make XROOTD target-based.
Browse files Browse the repository at this point in the history
  • Loading branch information
hageboeck authored and SFT Nightly User committed Jul 22, 2021
1 parent 35ce940 commit c03017d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,8 @@ if(xrootd AND NOT builtin_xrootd)
endif()
else()
set(XROOTD_VERSIONNUM ${xrdversnum}) # variable used internally
add_library(XROOTD ALIAS XROOTD::XROOTD)
endif()
add_library(XROOTD ALIAS XROOTD::XROOTD)
endif()

if(builtin_xrootd AND NO_CONNECTION)
Expand Down Expand Up @@ -1000,7 +1000,7 @@ if(builtin_xrootd)
${XROOTD_ROOTDIR}/${XROOTD_LIBDIR}/libXrdClient${CMAKE_SHARED_LIBRARY_SUFFIX}
${XROOTD_ROOTDIR}/${XROOTD_LIBDIR}/libXrdCl${CMAKE_SHARED_LIBRARY_SUFFIX})
ExternalProject_Add(
XROOTD
BUILTIN_XROOTD
URL ${XROOTD_SRC_URI}
URL_HASH SHA256=86d8e4bd7382fb3053002cf3d58b997623d1d26db93c8891080603827f01b4cd
INSTALL_DIR ${XROOTD_ROOTDIR}
Expand Down Expand Up @@ -1038,11 +1038,13 @@ if(builtin_xrootd)
CODE "xrootd_libs_change_rpath(${XROOTD_ROOTDIR}/${XROOTD_LIBDIR} ${CMAKE_INSTALL_FULL_LIBDIR})"
)
endif()
set(XROOTD_TARGET XROOTD)
# Unclear if this is still needed by external projects:
set(XROOTD_TARGET BUILTIN_XROOTD)
set(xrootd ON CACHE BOOL "Enabled because builtin_xrootd requested (${xrootd_description})" FORCE)

# Create a usable target:
add_library(XROOTD INTERFACE)
add_dependencies(XROOTD BUILTIN_XROOTD)
target_link_libraries(XROOTD INTERFACE ${XROOTD_LIBRARIES})
target_include_directories(XROOTD INTERFACE ${XROOTD_INCLUDE_DIRS})
target_compile_options(XROOTD INTERFACE ${XROOTD_CFLAGS})
Expand Down

0 comments on commit c03017d

Please sign in to comment.