From fcdeb6667967577bb26f2e64a303f4136158e233 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Mon, 14 Sep 2020 15:20:35 +0200 Subject: [PATCH] [CMake] Enforce conan supplied mfront. Fixes #3034. --- CMakeLists.txt | 6 ++++++ scripts/cmake/Find.cmake | 3 +++ 2 files changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d74fc66b44..a5280639c18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -263,6 +263,12 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/ThirdParty/vtkdiff/CMakeLists.txt AND BUILD_TEST install(PROGRAMS $<TARGET_FILE:vtkdiff> DESTINATION bin COMPONENT ogs_extras) endif() +# Correct tfel paths (they seem to be hard-coded to /usr/local/tfel/...) +if(OGS_USE_MFRONT AND OGS_USE_CONAN) + set(TFEL_INCLUDE_PATH "${CONAN_TFEL_ROOT}/include") + set(TFEL_LIBRARY_PATH "${CONAN_TFEL_ROOT}/lib") +endif() + include(scripts/cmake/CheckHeaderCompilation.cmake) add_subdirectory(Applications) diff --git a/scripts/cmake/Find.cmake b/scripts/cmake/Find.cmake index 2a1f6e98496..0af84de763a 100644 --- a/scripts/cmake/Find.cmake +++ b/scripts/cmake/Find.cmake @@ -90,6 +90,9 @@ if(OGS_USE_MFRONT) set(HAVE_PTHREADS TRUE) add_definitions(-DHAVE_PTHREADS) endif() + if(OGS_USE_CONAN) + set(TFEL_INSTALL_PATH ${CONAN_TFEL_ROOT} CACHE INTERNAL "") + endif() endif() # Do not search for libs if this option is set -- GitLab