ADD_LIBRARY(JFJochImageAnalysis STATIC
        CrystalLattice.cpp CrystalLattice.h
        IndexerWrapper.cpp IndexerWrapper.h
        AzimuthalIntegrationMapping.cpp AzimuthalIntegrationMapping.h
        StrongPixelSet.cpp StrongPixelSet.h AzimuthalIntegrationProfile.cpp AzimuthalIntegrationProfile.h
        SpotFindingSettings.h
        AzimuthalIntegration.cpp
        AzimuthalIntegration.h
        CPUSpotFinder.cpp
        CPUSpotFinder.h
        MXAnalyzer.cpp
        MXAnalyzer.h
        Regression.h)

TARGET_LINK_LIBRARIES(JFJochImageAnalysis JFJochCommon)

TARGET_INCLUDE_DIRECTORIES(JFJochImageAnalysis PUBLIC fast-feedback-indexer/eigen)

IF (CMAKE_CUDA_COMPILER)
    SET(CMAKE_CUDA_ARCHITECTURES 70 75 80 86 89)

    FetchContent_Declare(
            fast-indexer
            GIT_REPOSITORY https://github.com/fleon-psi/fast-feedback-indexer/
            GIT_TAG 66c3f44
    )

    FetchContent_MakeAvailable(fast-indexer)
    TARGET_LINK_LIBRARIES(JFJochImageAnalysis fast_indexer_static)
ELSE()
    MESSAGE(WARNING "CUDA is strongly recommended for image analysis." )
ENDIF()
