# The name of the package:
project(analysis VERSION 1.0)
atlas_subdir (analysis)

# Add the shared library:
atlas_add_library (analysisLib
  analysis/*.h Root/*.cxx
  PUBLIC_HEADERS analysis
  LINK_LIBRARIES AnaAlgorithmLib {% for lib in link_libraries %}{{ lib }} {% endfor %})

# xAODRootAccess changed the tracer API in AnalysisBase 25.2.87.
# ATLAS_PROJECT is set by the parent CMake project and its Config file supplies
# the corresponding <project>_VERSION variable.
if ( "${${ATLAS_PROJECT}_VERSION}" VERSION_GREATER_EQUAL "25.2.87" )
  target_compile_definitions(analysisLib PRIVATE FUNC_ADL_TRACER_INSTANCE)
endif ()

if (XAOD_STANDALONE)
 # Add the dictionary (for AnalysisBase only):
 atlas_add_dictionary (queryDict
  analysis/query.h
  analysis/selection.xml
  LINK_LIBRARIES analysisLib)
endif ()

if (NOT XAOD_STANDALONE)
  # Add a component library for AthAnalysis only:
  atlas_add_component (analysis
    src/components/*.cxx
    LINK_LIBRARIES analysisLib)
endif ()

# Install files from the package:
atlas_install_scripts( share/*_eljob.py )
