From 81b1f763968a0434173170da1521aa2c661c136e Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Fri, 27 Apr 2012 12:54:52 +0200
Subject: [PATCH] FindMetis uses CMake default find functions now.

---
 scripts/cmake/FindMetis.cmake | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/scripts/cmake/FindMetis.cmake b/scripts/cmake/FindMetis.cmake
index 0dfe63c5f9e..f368791f09e 100644
--- a/scripts/cmake/FindMetis.cmake
+++ b/scripts/cmake/FindMetis.cmake
@@ -1,14 +1,15 @@
 #
 # Find the METIS includes and libraries
 #
+#    METIS_INCLUDE_DIR - where to find metis.h
+#    METIS_LIBRARIES   - List of fully qualified libraries to link against.
+#    METIS_FOUND       - Do not attempt to use if "no" or undefined.
+#
 # METIS is an library that implements a variety of algorithms for
 # partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of
 # sparse matrices. It can be found at:
 # http://glaros.dtc.umn.edu/gkhome/metis/metis/download
 #
-# METIS_INCLUDE_DIR - where to find autopack.h
-# METIS_LIBRARIES   - List of fully qualified libraries to link against.
-# METIS_FOUND       - Do not attempt to use if "no" or undefined.
 
 FIND_PATH(METIS_INCLUDE_DIR metis.h
 	/usr/include/metis
@@ -22,10 +23,5 @@ FIND_LIBRARY(METIS_LIBRARY metis
 	${CMAKE_SOURCE_DIR}/../libs/lib
 )
 
-IF(METIS_INCLUDE_DIR)
-  IF(METIS_LIBRARY)
-    SET( METIS_LIBRARIES ${METIS_LIBRARY})
-    SET( METIS_FOUND "YES" )
-    MESSAGE(STATUS "Metis found.")
-  ENDIF(METIS_LIBRARY)
-ENDIF(METIS_INCLUDE_DIR)
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Metis DEFAULT_MSG METIS_LIBRARY METIS_INCLUDE_DIR)
-- 
GitLab