From: Mark Abraham Date: Tue, 2 Sep 2014 15:40:56 +0000 (+0200) Subject: More hacking to get the template to detect and build X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=b0f65ea0c9811798148d885255b26ee551f30de7;p=alexxy%2Fgromacs.git More hacking to get the template to detect and build Change-Id: Ifa945dedfcd70a571171fb156d5eaad37e1d761c --- diff --git a/share/template/cmake/FindGROMACS.cmakein b/share/template/cmake/FindGROMACS.cmakein index 53fec71361..f50d356a35 100644 --- a/share/template/cmake/FindGROMACS.cmakein +++ b/share/template/cmake/FindGROMACS.cmakein @@ -155,8 +155,14 @@ endif(PC_GROMACS_INCLUDE_DIRS) if(NOT ${GROMACS_MAJOR_VERSION} LESS 5) include(CheckIncludeFile) - # Let find_package find the subset of Boost installed with GROMACS - set(BOOST_INCLUDEDIR ${GROMACS_INCLUDE_DIRS}/gromacs/external/boost) + # Let find_package find the subset of Boost installed with + # GROMACS, by appending the relevant subdirectory, unless + # pkg-config already took care of it. + if(PC_GROMACS_INCLUDE_DIRS) + set(BOOST_INCLUDEDIR ${GROMACS_INCLUDE_DIRS}) + else() + set(BOOST_INCLUDEDIR ${GROMACS_INCLUDE_DIRS}/gromacs/external/boost) + endif() find_package(Boost 1.44.0 REQUIRED) if(Boost_FOUND) list(APPEND GROMACS_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})