gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / suitesparse-mongoose-cmake.patch
CommitLineData
aac148a8
FG
1Fix required by suitesparse to build Mongoose
2
3The CMakeLists.txt of Mongoose assumes that SuiteSparse_config has been
4installed into the suitesparse source directory, which is not the case
5for us, as we are building suitesparse out-of-tree.
6
7SuiteSparse_config can instead be found in the ${CMAKE_INSTALL_PREFIX}
8directory.
9
10diff --git a/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt
11index 7e134ab..76fa9e2 100644
12--- a/Mongoose/CMakeLists.txt
13+++ b/Mongoose/CMakeLists.txt
14@@ -148,10 +148,10 @@ set(CMAKE_CXX_STANDARD 11)
15 #set(CMAKE_CXX_STANDARD_REQUIRED ON)
16
17 # determine which SuiteSparse_config to use
18-if (EXISTS ${PROJECT_SOURCE_DIR}/../SuiteSparse_config)
19- message(STATUS "External ../SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
20+if (EXISTS ${CMAKE_INSTALL_PREFIX})
21+ message(STATUS "External SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
22 set ( SUITESPARSE_CONFIG_DIR ${PROJECT_SOURCE_DIR}/../SuiteSparse_config )
23- link_directories ( ${PROJECT_SOURCE_DIR}/../lib )
24+ link_directories ( ${CMAKE_INSTALL_PREFIX}/lib )
25 message ( STATUS "Note: ../SuiteSparse_config must be compiled before compiling Mongoose" )
26 set ( SUITESPARSE_CONFIG_LIBRARY suitesparseconfig )
27 else ()