Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 73bc3ca30d6634dedb4968b1641f2b5dab95a315)
+++ CMakeLists.txt	(revision 90187bd4b1507f0a574528b78224f1b0362839fd)
@@ -26,7 +26,19 @@
 ENDIF(SET_RPATH)
     
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
+
 # Declare ROOT dependency
 find_package(ROOT COMPONENTS EG Eve Geom Gui GuiHtml GenVector Hist Physics Matrix Graf RIO Tree Gpad RGL MathCore)
 include(${ROOT_USE_FILE})
+
+
+# Declare Pythia8 dependancy
+find_package(Pythia8)
+if(PYTHIA8_FOUND)
+  message(STATUS "Pythia8 found")
+  include_directories(${PYTHIA8_INCLUDE_DIRS})
+  set(LIBS ${LIBS} ${PYTHIA8_LIBRARIES})
+endif(PYTHIA8_FOUND)
+
 
 if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
@@ -41,4 +53,6 @@
   endif()
 endfunction()
+
+
 
 # Declare position of all other externals needed
@@ -77,4 +91,8 @@
 target_link_Libraries(Delphes ${ROOT_LIBRARIES} ${ROOT_COMPONENT_LIBRARIES})
 target_link_Libraries(DelphesDisplay ${ROOT_LIBRARIES} ${ROOT_COMPONENT_LIBRARIES})
+if(PYTHIA8_FOUND)
+  target_link_libraries(Delphes ${LIBS}) # needed for DelphesPythia8
+endif(PYTHIA8_FOUND)
+
 
 install(TARGETS Delphes DelphesDisplay DESTINATION lib)
Index: cmake/Modules/FindPythia8.cmake
===================================================================
--- cmake/Modules/FindPythia8.cmake	(revision 90187bd4b1507f0a574528b78224f1b0362839fd)
+++ cmake/Modules/FindPythia8.cmake	(revision 90187bd4b1507f0a574528b78224f1b0362839fd)
@@ -0,0 +1,58 @@
+# Find the Pythia8 includes and library.
+#
+# This module defines
+# PYTHIA8_INCLUDE_DIR   where to locate Pythia.h file
+# PYTHIA8_LIBRARY       where to find the libpythia8 library
+# PYTHIA8_<lib>_LIBRARY Addicional libraries
+# PYTHIA8_LIBRARIES     (not cached) the libraries to link against to use Pythia8
+# PYTHIA8_FOUND         if false, you cannot build anything that requires Pythia8
+# PYTHIA8_VERSION       version of Pythia8 if found
+
+set(_pythia8dirs
+    ${PYTHIA8}
+    $ENV{PYTHIA8}
+    ${PYTHIA8_DIR}
+    $ENV{PYTHIA8_DIR}
+    /usr
+    /opt/pythia8)
+
+find_path(PYTHIA8_INCLUDE_DIR
+          NAMES Pythia8/Pythia.h
+          HINTS ${_pythia8dirs}
+          PATH_SUFFIXES include include/Pythia8 include/pythia8
+          DOC "Specify the directory containing Pythia.h.")
+
+find_library(PYTHIA8_LIBRARY
+             NAMES pythia8 Pythia8
+             HINTS ${_pythia8dirs}
+             PATH_SUFFIXES lib
+             DOC "Specify the Pythia8 library here.")
+
+find_library(PYTHIA8_hepmcinterface_LIBRARY
+             NAMES hepmcinterface pythia8tohepmc
+             HINTS ${_pythia8dirs}
+             PATH_SUFFIXES lib)
+
+find_library(PYTHIA8_lhapdfdummy_LIBRARY
+             NAMES lhapdfdummy
+             HINTS ${_pythia8dirs}
+             PATH_SUFFIXES lib)
+
+foreach(_lib PYTHIA8_LIBRARY PYTHIA8_hepmcinterface_LIBRARY PYTHIA8_lhapdfdummy_LIBRARY)
+  if(${_lib})
+    set(PYTHIA8_LIBRARIES ${PYTHIA8_LIBRARIES} ${${_lib}})
+  endif()
+endforeach()
+set(PYTHIA8_INCLUDE_DIRS ${PYTHIA8_INCLUDE_DIR} ${PYTHIA8_INCLUDE_DIR}/Pythia8 )
+
+find_path(PYTHIA8_DATA 
+          NAMES MainProgramSettings.xml
+          HINTS ${_pythia8dirs}
+          PATH_SUFFIXES xmldoc)
+
+# handle the QUIETLY and REQUIRED arguments and set PYTHIA8_FOUND to TRUE if
+# all listed variables are TRUE
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Pythia8 DEFAULT_MSG PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY)
+mark_as_advanced(PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY PYTHIA8_hepmcinterface_LIBRARY PYTHIA8_lhapdfdummy_LIBRARY)
Index: readers/CMakeLists.txt
===================================================================
--- readers/CMakeLists.txt	(revision 73bc3ca30d6634dedb4968b1641f2b5dab95a315)
+++ readers/CMakeLists.txt	(revision 90187bd4b1507f0a574528b78224f1b0362839fd)
@@ -9,5 +9,7 @@
 list(REMOVE_ITEM executables DelphesCMSFWLite.cpp)
 list(REMOVE_ITEM executables DelphesProMC.cpp)
-list(REMOVE_ITEM executables DelphesPythia8.cpp)
+if(NOT PYTHIA8_FOUND)
+  list(REMOVE_ITEM executables DelphesPythia8.cpp)
+endif()
 
 # build all executables and put them into bin/
