From: Stephen Sinclair <radarsat1@gmail.com>
Date: Thu, 11 Jun 2020 21:20:33 +0000
Subject: Replace missing FindSuiteSparse.cmake with path to cs.h

When FCLIB_WITH_MERIT_FUNCTIONS is enabled, the package tries to find
SuiteSparse because it needs cs.h.  However, FindSuiteSparse.cmake is
not installed by the package.  Since we have a dependency on
libsuitesparse-dev, we know where cs.h is, so we can add it to the
FCLIB target directly.

fclib (3.1.0+dfsg-1) UNRELEASED; urgency=medium

  * New upstream version.
  * Change paths to correspond with new CMake install location.
  * Make unittests-cmake test the FCLIB exported target.
  * Hardcode path to cs.h from libsuitesparse-dev.
---
 fclib-config.cmake.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fclib-config.cmake.in b/fclib-config.cmake.in
index 687c673..ea45127 100644
--- a/fclib-config.cmake.in
+++ b/fclib-config.cmake.in
@@ -55,7 +55,8 @@ set(FCLIB_WITH_MERIT_FUNCTIONS @FCLIB_WITH_MERIT_FUNCTIONS@)
 find_dependency(HDF5 COMPONENTS C HL REQUIRED)
 
 if(FCLIB_WITH_MERIT_FUNCTIONS)
-  find_dependency(SuiteSparse REQUIRED COMPONENTS CXSparse)
+  # add path to cs.h from libsuitesparse-dev
+  target_include_directories(FCLIB::fclib INTERFACE /usr/include/suitesparse)
 endif()
 
 # set list of include dirs for external libraries
