diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt --- a/clang/tools/c-index-test/CMakeLists.txt +++ b/clang/tools/c-index-test/CMakeLists.txt @@ -40,12 +40,7 @@ # If libxml2 is available, make it available for c-index-test. if (CLANG_HAVE_LIBXML) - if ((CMAKE_OSX_SYSROOT) AND (EXISTS ${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR})) - include_directories(SYSTEM ${CMAKE_OSX_SYSROOT}/${LIBXML2_INCLUDE_DIR}) - else() - include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR}) - endif() - target_link_libraries(c-index-test PRIVATE ${LIBXML2_LIBRARIES}) + target_link_libraries(c-index-test PRIVATE LibXml2::LibXml2) endif() if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt --- a/lldb/source/Host/CMakeLists.txt +++ b/lldb/source/Host/CMakeLists.txt @@ -137,7 +137,7 @@ list(APPEND EXTRA_LIBS kvm) endif() if (LLDB_ENABLE_LIBXML2) - list(APPEND EXTRA_LIBS ${LIBXML2_LIBRARIES}) + list(APPEND EXTRA_LIBS LibXml2::LibXml2) endif() if (HAVE_LIBDL) list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS})