cmake: fix pkg_depend macro

This commit is contained in:
Christoph Junghans 2018-05-20 07:27:22 -06:00
parent cfb350d40b
commit e6f76451eb
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ foreach(PKG ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
endforeach()
macro(pkg_depends PKG1 PKG2)
if(PKG_${PKG1} AND NOT PKG_${PKG2})
if(PKG_${PKG1} AND NOT (PKG_${PKG2} OR BUILD_${PKG2}))
message(FATAL_ERROR "${PKG1} package needs LAMMPS to be build with ${PKG2}")
endif()
endmacro()