summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/suitesparse-mongoose-cmake.patch
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-03-10 20:50:02 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-03-10 20:50:02 +0100
commit50b99c90c87642f664f9c9523a6e40fc8542ddcf (patch)
tree9fc8845e93ba913730e5fb92bbad158716d84e74 /gnu/packages/patches/suitesparse-mongoose-cmake.patch
parentbda4b5e0453e4c8feda24306b4aa76ad5406eb7d (diff)
parent21656ffa3b6d78a610f0befced20cc9b4b3baab6 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/suitesparse-mongoose-cmake.patch')
-rw-r--r--gnu/packages/patches/suitesparse-mongoose-cmake.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/patches/suitesparse-mongoose-cmake.patch b/gnu/packages/patches/suitesparse-mongoose-cmake.patch
new file mode 100644
index 0000000000..e5062f9aaa
--- /dev/null
+++ b/gnu/packages/patches/suitesparse-mongoose-cmake.patch
@@ -0,0 +1,27 @@
+Fix required by suitesparse to build Mongoose
+
+The CMakeLists.txt of Mongoose assumes that SuiteSparse_config has been
+installed into the suitesparse source directory, which is not the case
+for us, as we are building suitesparse out-of-tree.
+
+SuiteSparse_config can instead be found in the ${CMAKE_INSTALL_PREFIX}
+directory.
+
+diff --git a/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt
+index 7e134ab..76fa9e2 100644
+--- a/Mongoose/CMakeLists.txt
++++ b/Mongoose/CMakeLists.txt
+@@ -148,10 +148,10 @@ set(CMAKE_CXX_STANDARD 11)
+ #set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+ # determine which SuiteSparse_config to use
+-if (EXISTS ${PROJECT_SOURCE_DIR}/../SuiteSparse_config)
+- message(STATUS "External ../SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
++if (EXISTS ${CMAKE_INSTALL_PREFIX})
++ message(STATUS "External SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
+ set ( SUITESPARSE_CONFIG_DIR ${PROJECT_SOURCE_DIR}/../SuiteSparse_config )
+- link_directories ( ${PROJECT_SOURCE_DIR}/../lib )
++ link_directories ( ${CMAKE_INSTALL_PREFIX}/lib )
+ message ( STATUS "Note: ../SuiteSparse_config must be compiled before compiling Mongoose" )
+ set ( SUITESPARSE_CONFIG_LIBRARY suitesparseconfig )
+ else ()