Back to home page

EIC code displayed by LXR

 
 

    


Warning, /acts/cmake/FindPythia8.cmake is written in an unsupported language. File is not indexed.

0001 # Find the Pythia8 includes and libraries.
0002 #
0003 # This module defines the `Pythia8` imported target that encodes all
0004 # necessary information in its target properties.
0005 
0006 find_library(
0007     Pythia8_LIBRARY
0008     NAMES Pythia8 pythia8
0009     HINTS
0010     ENV PYTHIA8_DIR
0011     PYTHIA8
0012     PATHS /opt/pythia8 /usr/local
0013     DOC "The Pythia8 library"
0014 )
0015 find_path(
0016     Pythia8_INCLUDE_DIR
0017     NAMES Pythia8/Pythia.h
0018     HINTS
0019     ENV PYTHIA8_DIR
0020     PYTHIA8
0021     PATHS /opt/pythia8 /usr/local
0022     DOC "The Pythia8 include directory"
0023 )
0024 
0025 file(READ "${Pythia8_INCLUDE_DIR}/Pythia8/Pythia.h" Pythia8_VERSION_FILE)
0026 string(
0027     REGEX MATCH
0028     "#define PYTHIA_VERSION (8\.[0-9]+)"
0029     _
0030     ${Pythia8_VERSION_FILE}
0031 )
0032 set(Pythia8_VERSION ${CMAKE_MATCH_1})
0033 
0034 find_package_handle_standard_args(
0035     Pythia8
0036     REQUIRED_VARS Pythia8_LIBRARY Pythia8_INCLUDE_DIR
0037     VERSION_VAR Pythia8_VERSION
0038 )
0039 
0040 add_library(Pythia8 SHARED IMPORTED)
0041 set_property(TARGET Pythia8 PROPERTY IMPORTED_LOCATION ${Pythia8_LIBRARY})
0042 set_property(
0043     TARGET Pythia8
0044     PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Pythia8_INCLUDE_DIR}
0045 )
0046 
0047 mark_as_advanced(Pythia8_FOUND Pythia8_INCLUDE_DIR Pythia8_LIBRARY)