From b5d866988cb74d4d9c29aed897e635f1004b857e Mon Sep 17 00:00:00 2001 From: Pere Mato <pere.mato@cern.ch> Date: Wed, 4 Jan 2017 18:06:26 +0100 Subject: [PATCH] re-introduced HEPMC_ROOT_DIR as a HINT --- modules/FindHepMC.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/FindHepMC.cmake b/modules/FindHepMC.cmake index 509f748..5e5714c 100644 --- a/modules/FindHepMC.cmake +++ b/modules/FindHepMC.cmake @@ -8,14 +8,17 @@ # HEPMC_LIBRARIES (not cached) # HEPMC_LIBRARY_DIRS (not cached) -find_path(HEPMC_INCLUDE_DIR HepMC/GenEvent.h) +find_path(HEPMC_INCLUDE_DIR HepMC/GenEvent.h + HINTS ${HEPMC_ROOT_DIR}/include $ENV{HEPMC_ROOT_DIR}/include) set(HEPMC_INCLUDE_DIRS ${HEPMC_INCLUDE_DIR}) if(NOT HepMC_FIND_COMPONENTS) set(HepMC_FIND_COMPONENTS HepMC) endif() foreach(component ${HepMC_FIND_COMPONENTS}) - find_library(HEPMC_${component}_LIBRARY NAMES HepMC${component} ${component}) + find_library(HEPMC_${component}_LIBRARY + NAMES HepMC${component} ${component} + HINTS ${HEPMC_ROOT_DIR}/lib $ENV{HEPMC_ROOT_DIR}/lib) mark_as_advanced(HEPMC_${component}_LIBRARY) list(APPEND HEPMC_LIBRARIES ${HEPMC_${component}_LIBRARY}) get_filename_component(_comp_dir ${HEPMC_${component}_LIBRARY} PATH)