Fork me on GitHub

source: git/cmake/Modules/FindPythia8.cmake@ 8b8a46c

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 8b8a46c was 8b8a46c, checked in by William Fawcett <william.fawcett@…>, 7 years ago

start introducing pythia8 to cmake

  • Property mode set to 100644
File size: 1.9 KB
Line 
1# Find the Pythia8 includes and library.
2#
3# This module defines
4# PYTHIA8_INCLUDE_DIR where to locate Pythia.h file
5# PYTHIA8_LIBRARY where to find the libpythia8 library
6# PYTHIA8_<lib>_LIBRARY Addicional libraries
7# PYTHIA8_LIBRARIES (not cached) the libraries to link against to use Pythia8
8# PYTHIA8_FOUND if false, you cannot build anything that requires Pythia8
9# PYTHIA8_VERSION version of Pythia8 if found
10
11set(_pythia8dirs
12 ${PYTHIA8_DIR}
13 $ENV{PYTHIA8_DIR}
14 /usr
15 /opt/pythia8)
16
17find_path(PYTHIA8_INCLUDE_DIR
18 NAMES Pythia8/Pythia.h
19 HINTS ${_pythia8dirs}
20 PATH_SUFFIXES include include/Pythia8 include/pythia8
21 DOC "Specify the directory containing Pythia.h.")
22
23find_library(PYTHIA8_LIBRARY
24 NAMES pythia8 Pythia8
25 HINTS ${_pythia8dirs}
26 PATH_SUFFIXES lib
27 DOC "Specify the Pythia8 library here.")
28
29find_library(PYTHIA8_hepmcinterface_LIBRARY
30 NAMES hepmcinterface pythia8tohepmc
31 HINTS ${_pythia8dirs}
32 PATH_SUFFIXES lib)
33
34find_library(PYTHIA8_lhapdfdummy_LIBRARY
35 NAMES lhapdfdummy
36 HINTS ${_pythia8dirs}
37 PATH_SUFFIXES lib)
38
39foreach(_lib PYTHIA8_LIBRARY PYTHIA8_hepmcinterface_LIBRARY PYTHIA8_lhapdfdummy_LIBRARY)
40 if(${_lib})
41 set(PYTHIA8_LIBRARIES ${PYTHIA8_LIBRARIES} ${${_lib}})
42 endif()
43endforeach()
44set(PYTHIA8_INCLUDE_DIRS ${PYTHIA8_INCLUDE_DIR} ${PYTHIA8_INCLUDE_DIR}/Pythia8 )
45
46find_path(PYTHIA8_DATA
47 NAMES MainProgramSettings.xml
48 HINTS ${_pythia8dirs}
49 PATH_SUFFIXES xmldoc)
50
51# handle the QUIETLY and REQUIRED arguments and set PYTHIA8_FOUND to TRUE if
52# all listed variables are TRUE
53
54include(FindPackageHandleStandardArgs)
55find_package_handle_standard_args(Pythia8 DEFAULT_MSG PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY)
56mark_as_advanced(PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY PYTHIA8_hepmcinterface_LIBRARY PYTHIA8_lhapdfdummy_LIBRARY)
Note: See TracBrowser for help on using the repository browser.