-- Link DGL against renamed bundled METIS target dgl_metis.
-- Needed together with patch-third__party_METIS_libmetis_CMakeLists.txt
-- to avoid target/library name conflicts on FreeBSD (dgl issue #5666 workaround).
--- CMakeLists.txt.orig	2024-09-16 17:42:45 UTC
+++ CMakeLists.txt
@@ -363,8 +363,8 @@ else(EXTERNAL_METIS_PATH)
     # /usr/include/signal.h:156:29: error: unknown type name 'siginfo_t'.
     # So I(Rui) define _POSIX_C_SOURCE to 200809L for GKlib and metis to avoid the error.
     target_compile_definitions(GKlib PRIVATE _POSIX_C_SOURCE=200809L)
-    target_compile_definitions(metis PRIVATE _POSIX_C_SOURCE=200809L)
-    list(APPEND DGL_LINKER_LIBS metis GKlib)
+    target_compile_definitions(dgl_metis PRIVATE _POSIX_C_SOURCE=200809L)
+    list(APPEND DGL_LINKER_LIBS dgl_metis GKlib)
   endif(NOT MSVC)
 endif(EXTERNAL_METIS_PATH)
