LMFIT_FOUND will also be true for version lower than 7.0, so we
need to check the version explicitly in gmxManageLmfit.cmake.
Change-Id: Ia3ae12b3a74d2b567432f5ef18a77c13b19cdb85
set(HAVE_LMFIT 1 CACHE INTERNAL "Is lmfit found?")
elseif(GMX_USE_LMFIT STREQUAL "EXTERNAL")
# Find an external lmfit library.
- find_package(Lmfit ${GMX_LMFIT_MINIMUM_REQUIRED_VERSION})
- if(NOT LMFIT_FOUND)
- message(FATAL_ERROR "External lmfit could not be found, please adjust your pkg-config path to include the lmfit.pc file")
+ find_package(Lmfit ${GMX_LMFIT_REQUIRED_VERSION})
+ if(NOT LMFIT_FOUND OR LMFIT_VERSION VERSION_LESS GMX_LMFIT_REQUIRED_VERSION)
+ message(FATAL_ERROR "External lmfit >= ${GMX_LMFIT_REQUIRED_VERSION} could not be found, please adjust your pkg-config path to include the lmfit.pc file")
endif()
set(HAVE_LMFIT 1 CACHE INTERNAL "Is lmfit found?")