Fork me on GitHub

source: git/cmake/FindPythia8.cmake@ 0852ba95

Last change on this file since 0852ba95 was fe2cdc9, checked in by Pavel Demin <pavel-demin@…>, 7 years ago

move cmake/Modules/FindPythia8.cmake to cmake/FindPythia8.cmake

  • Property mode set to 100644
File size: 2.0 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}
13 $ENV{PYTHIA8}
14 ${PYTHIA8_DIR}
15 $ENV{PYTHIA8_DIR}
16 /usr
17 /opt/pythia8)
18
19find_path(PYTHIA8_INCLUDE_DIR
20 NAMES Pythia8/Pythia.h
21 HINTS ${_pythia8dirs}
22 PATH_SUFFIXES include include/Pythia8 include/pythia8
23 DOC "Specify the directory containing Pythia.h.")
24
25find_library(PYTHIA8_LIBRARY
26 NAMES pythia8 Pythia8
27 HINTS ${_pythia8dirs}
28 PATH_SUFFIXES lib
29 DOC "Specify the Pythia8 library here.")
30
31find_library(PYTHIA8_hepmcinterface_LIBRARY
32 NAMES hepmcinterface pythia8tohepmc
33 HINTS ${_pythia8dirs}
34 PATH_SUFFIXES lib)
35
36find_library(PYTHIA8_lhapdfdummy_LIBRARY
37 NAMES lhapdfdummy
38 HINTS ${_pythia8dirs}
39 PATH_SUFFIXES lib)
40
41foreach(_lib PYTHIA8_LIBRARY PYTHIA8_hepmcinterface_LIBRARY PYTHIA8_lhapdfdummy_LIBRARY)
42 if(${_lib})
43 set(PYTHIA8_LIBRARIES ${PYTHIA8_LIBRARIES} ${${_lib}})
44 endif()
45endforeach()
46set(PYTHIA8_INCLUDE_DIRS ${PYTHIA8_INCLUDE_DIR} ${PYTHIA8_INCLUDE_DIR}/Pythia8 )
47
48find_path(PYTHIA8_DATA
49 NAMES MainProgramSettings.xml
50 HINTS ${_pythia8dirs}
51 PATH_SUFFIXES xmldoc)
52
53# handle the QUIETLY and REQUIRED arguments and set PYTHIA8_FOUND to TRUE if
54# all listed variables are TRUE
55
56include(FindPackageHandleStandardArgs)
57find_package_handle_standard_args(Pythia8 DEFAULT_MSG PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY)
58mark_as_advanced(PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY PYTHIA8_hepmcinterface_LIBRARY PYTHIA8_lhapdfdummy_LIBRARY)
Note: See TracBrowser for help on using the repository browser.