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 
0013 if(${FastJet_INCLUDE_DIR} STREQUAL "FastJet_INCLUDE_DIR-NOTFOUND")
0014     message(FATAL_ERROR "FastJet include directory not found")
0015 endif()
0016 
0017 file(READ "${FastJet_INCLUDE_DIR}/fastjet/config_auto.h" FastJet_VERSION_FILE)
0018 string(
0019     REGEX MATCH
0020     "#define[ \t]+FASTJET_PACKAGE_VERSION[ \t]+\"([0-9]+\.[0-9]+\.[0-9]+)\""
0021     _
0022     ${FastJet_VERSION_FILE}
0023 )
0024 if(NOT CMAKE_MATCH_1)
0025     message(FATAL_ERROR "Failed to extract FastJet version from config_auto.h")
0026 endif()
0027 
0028 set(FastJet_VERSION ${CMAKE_MATCH_1})
0029 
0030 find_package_handle_standard_args(
0031     FastJet
0032     REQUIRED_VARS FastJet_LIBRARY FastJet_INCLUDE_DIR
0033     VERSION_VAR FastJet_VERSION
0034 )
0035 
0036 add_library(FastJet SHARED IMPORTED)
0037 add_library(FastJet::FastJet ALIAS FastJet)
0038 
0039 set_property(TARGET FastJet PROPERTY IMPORTED_LOCATION ${FastJet_LIBRARY})
0040 set_property(
0041     TARGET FastJet
0042     PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${FastJet_INCLUDE_DIR}
0043 )
0044 
0045 mark_as_advanced(FastJet_FOUND FastJet_INCLUDE_DIR FastJet_LIBRARY)
0046 
0047 if(NOT FastJet_FIND_QUIETLY)
0048     if(FastJet_FOUND)
0049         message(STATUS "Found FastJet ${FastJet_VERSION} at ${FastJet_LIBRARY}")
0050     else()
0051         message(FATAL_ERROR "FastJet not found")
0052     endif()
0053 endif()