From 7aec563b868e0ec03385ee68ea67101b47d568ce Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 18 Jul 2023 17:02:48 -0400 Subject: [PATCH] building lammps-shell requires pkg-config --- cmake/Modules/Tools.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/Modules/Tools.cmake b/cmake/Modules/Tools.cmake index 285c5f2405..148fb6440e 100644 --- a/cmake/Modules/Tools.cmake +++ b/cmake/Modules/Tools.cmake @@ -37,7 +37,11 @@ if(BUILD_TOOLS) add_subdirectory(${LAMMPS_TOOLS_DIR}/phonon ${CMAKE_BINARY_DIR}/phana_build) endif() +find_package(PkgConfig QUIET) if(BUILD_LAMMPS_SHELL) + if(NOT PkgConfig_FOUND) + message(FATAL_ERROR "Must have pkg-config installed for building LAMMPS shell") + endif() find_package(PkgConfig REQUIRED) pkg_check_modules(READLINE IMPORTED_TARGET REQUIRED readline) if(NOT LAMMPS_EXCEPTIONS)