From 923cf632737afc7ed6f96cd35b0b6ccebc916795 Mon Sep 17 00:00:00 2001 From: Allan Leal Date: Thu, 8 Jun 2023 13:33:27 +0200 Subject: [PATCH 1/2] Add cmake message showing that ChemicalFun was found, its dir and version --- cmake/modules/ThermoFunFindDeps.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/modules/ThermoFunFindDeps.cmake b/cmake/modules/ThermoFunFindDeps.cmake index 3a893dc..b541345 100644 --- a/cmake/modules/ThermoFunFindDeps.cmake +++ b/cmake/modules/ThermoFunFindDeps.cmake @@ -17,6 +17,8 @@ endif() find_package(ChemicalFun REQUIRED) if(NOT ChemicalFun_FOUND) message(FATAL_ERROR "ChemicalFun library not found") +else() + message(STATUS "Found ChemicalFun: ${ChemicalFun_DIR} (found version \"${ChemicalFun_VERSION}\")") endif() if(USE_SPDLOG_PRECOMPILED) From fa2475f295814ce21510cef3536f48e56d733260 Mon Sep 17 00:00:00 2001 From: Allan Leal Date: Thu, 8 Jun 2023 13:34:13 +0200 Subject: [PATCH 2/2] Added missing `find_package` calls in ThermoFunConfig.cmake.in In this cmake config file, we need to add `find_package` calls for the libraries that ThermoFun depends: find_package(ChemicalFun REQUIRED) find_package(spdlog CONFIG REQUIRED) This is needed so that codes depending on ThermoFun will be able to automatically find its dependencies too. --- cmake/modules/ThermoFunConfig.cmake.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/modules/ThermoFunConfig.cmake.in b/cmake/modules/ThermoFunConfig.cmake.in index e54ce46..ba6afef 100644 --- a/cmake/modules/ThermoFunConfig.cmake.in +++ b/cmake/modules/ThermoFunConfig.cmake.in @@ -9,5 +9,9 @@ if(NOT TARGET ThermoFun::ThermoFun) include("@PACKAGE_THERMOFUN_INSTALL_CONFIGDIR@/ThermoFunTargets.cmake") endif() +# Find all dependencies below. +find_package(ChemicalFun REQUIRED) +find_package(spdlog CONFIG REQUIRED) + # Recommended check at the end of a cmake config file. check_required_components(ThermoFun)