Timing
Last change
on this file since c7e90d8 was fe2cdc9, checked in by Pavel Demin <pavel-demin@…>, 6 years ago |
move cmake/Modules/FindPythia8.cmake to cmake/FindPythia8.cmake
|
-
Property mode
set to
100644
|
File size:
2.0 KB
|
Rev | Line | |
---|
[8b8a46c] | 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 |
|
---|
| 11 | set(_pythia8dirs
|
---|
[3283d6e] | 12 | ${PYTHIA8}
|
---|
| 13 | $ENV{PYTHIA8}
|
---|
[8b8a46c] | 14 | ${PYTHIA8_DIR}
|
---|
| 15 | $ENV{PYTHIA8_DIR}
|
---|
| 16 | /usr
|
---|
| 17 | /opt/pythia8)
|
---|
| 18 |
|
---|
| 19 | find_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 |
|
---|
| 25 | find_library(PYTHIA8_LIBRARY
|
---|
| 26 | NAMES pythia8 Pythia8
|
---|
| 27 | HINTS ${_pythia8dirs}
|
---|
| 28 | PATH_SUFFIXES lib
|
---|
| 29 | DOC "Specify the Pythia8 library here.")
|
---|
| 30 |
|
---|
| 31 | find_library(PYTHIA8_hepmcinterface_LIBRARY
|
---|
| 32 | NAMES hepmcinterface pythia8tohepmc
|
---|
| 33 | HINTS ${_pythia8dirs}
|
---|
| 34 | PATH_SUFFIXES lib)
|
---|
| 35 |
|
---|
| 36 | find_library(PYTHIA8_lhapdfdummy_LIBRARY
|
---|
| 37 | NAMES lhapdfdummy
|
---|
| 38 | HINTS ${_pythia8dirs}
|
---|
| 39 | PATH_SUFFIXES lib)
|
---|
| 40 |
|
---|
| 41 | foreach(_lib PYTHIA8_LIBRARY PYTHIA8_hepmcinterface_LIBRARY PYTHIA8_lhapdfdummy_LIBRARY)
|
---|
| 42 | if(${_lib})
|
---|
| 43 | set(PYTHIA8_LIBRARIES ${PYTHIA8_LIBRARIES} ${${_lib}})
|
---|
| 44 | endif()
|
---|
| 45 | endforeach()
|
---|
| 46 | set(PYTHIA8_INCLUDE_DIRS ${PYTHIA8_INCLUDE_DIR} ${PYTHIA8_INCLUDE_DIR}/Pythia8 )
|
---|
| 47 |
|
---|
| 48 | find_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 |
|
---|
| 56 | include(FindPackageHandleStandardArgs)
|
---|
| 57 | find_package_handle_standard_args(Pythia8 DEFAULT_MSG PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY)
|
---|
| 58 | mark_as_advanced(PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY PYTHIA8_hepmcinterface_LIBRARY PYTHIA8_lhapdfdummy_LIBRARY)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.