diff --git a/Generators/Photospp_i/CMakeLists.txt b/Generators/Photospp_i/CMakeLists.txt index 69d10d511288b5a7dfa5c2b67a9729c61222fe63..fa85facc811e14021e8adc743cde305f5c96125e 100644 --- a/Generators/Photospp_i/CMakeLists.txt +++ b/Generators/Photospp_i/CMakeLists.txt @@ -16,7 +16,11 @@ atlas_depends_on_subdirs( # External dependencies: find_package( CLHEP ) +if (HEPMC3_USE) +find_package( Photospp COMPONENTS Photospp PhotosppHepMC3 ) +else() find_package( Photospp COMPONENTS Photospp PhotosppHepMC ) +endif() # Remove the --as-needed linker flags: atlas_disable_as_needed() diff --git a/Generators/Photospp_i/src/Photospp_i.cxx b/Generators/Photospp_i/src/Photospp_i.cxx index 4daaf6ef4eef6d7275c72ccbb89f652b7fe3c02b..f1879752ba34752229f2462ec17ca6aec0e81262 100644 --- a/Generators/Photospp_i/src/Photospp_i.cxx +++ b/Generators/Photospp_i/src/Photospp_i.cxx @@ -7,7 +7,14 @@ #include "Photos/Photos.h" +#ifdef HEPMC3 +#include "Photos/PhotosHepMC3Event.h" +namespace Photospp { +using PhotosHepMCEvent=PhotosHepMC3Event; +} +#else #include "Photos/PhotosHepMCEvent.h" +#endif #include "Photos/Log.h" #include "GeneratorObjects/McEventCollection.h"