From 955ae46fa461129cae8f11f4d25dd3e3cd3d55a1 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 26 Jun 2024 09:36:51 +0200 Subject: [PATCH] CMake: Set SUNDIALS_ROOT Set SUNDIALS_ROOT to ensure we are finding the sundials CMake config from the vendored library and not any other installation. Fixes #2467. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b0c95321b..9b0374b3a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,9 +142,9 @@ else() set(VENDORED_SUNDIALS_BUILD_DIR ${VENDORED_SUNDIALS_DIR}/build) set(VENDORED_SUNDIALS_INSTALL_DIR ${VENDORED_SUNDIALS_BUILD_DIR}) endif() +set(SUNDIALS_ROOT "${VENDORED_SUNDIALS_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}") find_package( - SUNDIALS REQUIRED PATHS - "${VENDORED_SUNDIALS_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/sundials/") + SUNDIALS REQUIRED CONFIG PATHS "${SUNDIALS_ROOT}/cmake/sundials/") message(STATUS "Found SUNDIALS: ${SUNDIALS_DIR}") set(GSL_LITE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ThirdParty/gsl")