@@ -80,6 +80,15 @@ if( NOT XROOTD_EXTERNAL_TINYXML2 )
8080 FetchContent_MakeAvailable( tinyxml2 )
8181else ()
8282 find_package ( tinyxml2 REQUIRED )
83+ # tinyxml2 6.0.0 (EL8) provides the 'tinyxml2' target instead of the
84+ # 'tinyxml2::tinyxml2' target. If the former is found, define the latter.
85+ if ( TARGET tinyxml2 )
86+ # Create an INTERFACE wrapper that links to the existing target
87+ add_library (tinyxml2::tinyxml2 INTERFACE IMPORTED )
88+ set_target_properties (tinyxml2::tinyxml2 PROPERTIES
89+ INTERFACE_LINK_LIBRARIES tinyxml2
90+ )
91+ endif ()
8392endif ()
8493
8594##
@@ -144,7 +153,7 @@ target_link_libraries(XrdOssHttp XrdHTTPServerObj XrdPelicanHttpCore)
144153add_library ( XrdOssFilterObj OBJECT src/Filter .cc src/logging.cc )
145154set_target_properties ( XrdOssFilterObj PROPERTIES POSITION_INDEPENDENT_CODE ON )
146155target_include_directories ( XrdOssFilterObj PRIVATE ${XRootD_INCLUDE_DIRS} )
147- target_link_libraries ( XrdOssFilterObj ${XRootD_UTILS_LIBRARIES} ${XRootD_SERVER_LIBRARIES} )
156+ target_link_libraries ( XrdOssFilterObj ${XRootD_UTILS_LIBRARIES} ${XRootD_SERVER_LIBRARIES} std::filesystem )
148157
149158add_library ( XrdOssFilter MODULE "$<TARGET_OBJECTS:XrdOssFilterObj>" )
150159target_link_libraries ( XrdOssFilter XrdOssFilterObj )
@@ -165,7 +174,7 @@ target_link_libraries(XrdOssGlobus XrdOssGlobusObj XrdPelicanHttpCore)
165174#######################
166175add_library ( XrdOssPoscObj OBJECT src/Posc.cc )
167176set_target_properties ( XrdOssPoscObj PROPERTIES POSITION_INDEPENDENT_CODE ON )
168- target_link_libraries ( XrdOssPoscObj XRootD::XrdServer XRootD::XrdUtils Threads::Threads std::atomic )
177+ target_link_libraries ( XrdOssPoscObj XRootD::XrdServer XRootD::XrdUtils Threads::Threads std::atomic std::filesystem )
169178
170179add_library ( XrdOssPosc MODULE "$<TARGET_OBJECTS:XrdOssPoscObj>" )
171180target_link_libraries ( XrdOssPosc XrdOssPoscObj )
0 commit comments