From 902201bb85d9fc9bb9c0e26b2c5e48e109367e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Tue, 31 Oct 2023 12:52:39 +0100 Subject: [PATCH] Make example less dependent on layout of SuiteSparse source tree. This change should make the example more useful for downstream users. --- Example/CMakeLists.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Example/CMakeLists.txt b/Example/CMakeLists.txt index 2b2a2c895..c0e7698ab 100644 --- a/Example/CMakeLists.txt +++ b/Example/CMakeLists.txt @@ -5,6 +5,10 @@ # Copyright (c) 2022-2023, Timothy A. Davis, All Rights Reserved. # SPDX-License-Identifier: BSD-3-clause +# To build this example, add the location of the CMake config files to +# CMAKE_PREFIX_PATH if the SuiteSparse libraries aren't installed at a +# default location. + #------------------------------------------------------------------------------- # get the version #------------------------------------------------------------------------------- @@ -41,12 +45,7 @@ include ( GNUInstallDirs ) # set the module path for all Find*.cmake files. set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} - ${CMAKE_SOURCE_DIR}/cmake_modules - ${CMAKE_SOURCE_DIR}/../lib/cmake/SuiteSparse - ${CMAKE_INSTALL_PREFIX}/lib/cmake/SuiteSparse ) -# add path to cmake target files (if necessary) -set ( CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} - ${CMAKE_SOURCE_DIR}/../lib/cmake ) + ${CMAKE_SOURCE_DIR}/cmake_modules ) #------------------------------------------------------------------------------- # define my project @@ -82,8 +81,8 @@ find_package ( UMFPACK 6.2.2 REQUIRED ) # look for all external libaries: find_package ( OpenMP REQUIRED ) - -include ( SuiteSparseBLAS ) +find_package ( BLAS REQUIRED ) +find_package ( LAPACK REQUIRED ) #------------------------------------------------------------------------------- # configure files