building lammps-shell requires pkg-config

This commit is contained in:
Axel Kohlmeyer
2023-07-18 17:02:48 -04:00
parent 164b254602
commit 7aec563b86

View File

@ -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)