Skip to content

Commit c03017d

Browse files
hageboeckSFT Nightly User
authored and
SFT Nightly User
committed
fixup! [CMake] Make XROOTD target-based.
1 parent 35ce940 commit c03017d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cmake/modules/SearchInstalledSoftware.cmake

+5-3
Original file line numberDiff line numberDiff line change
@@ -968,8 +968,8 @@ if(xrootd AND NOT builtin_xrootd)
968968
endif()
969969
else()
970970
set(XROOTD_VERSIONNUM ${xrdversnum}) # variable used internally
971+
add_library(XROOTD ALIAS XROOTD::XROOTD)
971972
endif()
972-
add_library(XROOTD ALIAS XROOTD::XROOTD)
973973
endif()
974974

975975
if(builtin_xrootd AND NO_CONNECTION)
@@ -1000,7 +1000,7 @@ if(builtin_xrootd)
10001000
${XROOTD_ROOTDIR}/${XROOTD_LIBDIR}/libXrdClient${CMAKE_SHARED_LIBRARY_SUFFIX}
10011001
${XROOTD_ROOTDIR}/${XROOTD_LIBDIR}/libXrdCl${CMAKE_SHARED_LIBRARY_SUFFIX})
10021002
ExternalProject_Add(
1003-
XROOTD
1003+
BUILTIN_XROOTD
10041004
URL ${XROOTD_SRC_URI}
10051005
URL_HASH SHA256=86d8e4bd7382fb3053002cf3d58b997623d1d26db93c8891080603827f01b4cd
10061006
INSTALL_DIR ${XROOTD_ROOTDIR}
@@ -1038,11 +1038,13 @@ if(builtin_xrootd)
10381038
CODE "xrootd_libs_change_rpath(${XROOTD_ROOTDIR}/${XROOTD_LIBDIR} ${CMAKE_INSTALL_FULL_LIBDIR})"
10391039
)
10401040
endif()
1041-
set(XROOTD_TARGET XROOTD)
1041+
# Unclear if this is still needed by external projects:
1042+
set(XROOTD_TARGET BUILTIN_XROOTD)
10421043
set(xrootd ON CACHE BOOL "Enabled because builtin_xrootd requested (${xrootd_description})" FORCE)
10431044

10441045
# Create a usable target:
10451046
add_library(XROOTD INTERFACE)
1047+
add_dependencies(XROOTD BUILTIN_XROOTD)
10461048
target_link_libraries(XROOTD INTERFACE ${XROOTD_LIBRARIES})
10471049
target_include_directories(XROOTD INTERFACE ${XROOTD_INCLUDE_DIRS})
10481050
target_compile_options(XROOTD INTERFACE ${XROOTD_CFLAGS})

0 commit comments

Comments
 (0)