Back to home page

EIC code displayed by LXR

 
 

    


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

0001 # Find the FastJet includes and libraries.
0002 
0003 include(FindPackageHandleStandardArgs)
0004 
0005 find_library(FastJet_LIBRARY NAMES FastJet fastjet DOC "The FastJet library")
0006 
0007 find_path(
0008     FastJet_INCLUDE_DIR
0009     fastjet/version.hh
0010     DOC "The FastJet include directory"
0011 )
0012 if(${FastJet_INCLUDE_DIR} STREQUAL "FastJet_INCLUDE_DIR-NOTFOUND")
0013     message(FATAL_ERROR "FastJet include directory not found")
0014 endif()
0015 file(READ "${FastJet_INCLUDE_DIR}/fastjet/config_auto.h" FastJet_VERSION_FILE)
0016 string(
0017     REGEX MATCH
0018     "#define FASTJET_PACKAGE_VERSION  \"([0-9]+\.[0-9]+\.[0-9]+)\""
0019     _
0020     ${FastJet_VERSION_FILE}
0021 )
0022 
0023 set(FastJet_VERSION ${CMAKE_MATCH_1})
0024 
0025 find_package_handle_standard_args(
0026     FastJet
0027     REQUIRED_VARS FastJet_LIBRARY FastJet_INCLUDE_DIR
0028     VERSION_VAR FastJet_VERSION
0029 )
0030 
0031 add_library(FastJet SHARED IMPORTED)
0032 set_property(TARGET FastJet PROPERTY IMPORTED_LOCATION ${FastJet_LIBRARY})
0033 set_property(
0034     TARGET FastJet
0035     PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FastJet_INCLUDE_DIR}
0036 )
0037 
0038 mark_as_advanced(FastJet_FOUND FastJet_INCLUDE_DIR FastJet_LIBRARY)
0039 
0040 if(FastJet_FOUND)
0041     message(STATUS "Found FastJet ${FastJet_VERSION} at ${FastJet_LIBRARY}")
0042 else()
0043     message(FATAL_ERROR "FastJet not found")
0044 endif()