| 1 | Fix required by suitesparse to build Mongoose
|
| 2 |
|
| 3 | The CMakeLists.txt of Mongoose assumes that SuiteSparse_config has been
|
| 4 | installed into the suitesparse source directory, which is not the case
|
| 5 | for us, as we are building suitesparse out-of-tree.
|
| 6 |
|
| 7 | SuiteSparse_config can instead be found in the ${CMAKE_INSTALL_PREFIX}
|
| 8 | directory.
|
| 9 |
|
| 10 | diff --git a/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt
|
| 11 | index 7e134ab..76fa9e2 100644
|
| 12 | |
| 13 | |
| 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 ()
|