# ANSFR Unit Test
# vcxproj also compiles ANSFRCommon.cpp and OpenVINO engine sources inline
add_executable(ANSFR-UnitTest
    ANSFR-UnitTest.cpp
    ${CMAKE_SOURCE_DIR}/modules/ANSFR/ANSFRCommon.cpp
    ${CMAKE_SOURCE_DIR}/engines/OpenVINOEngine/src/faceapp/cnn.cpp
    ${CMAKE_SOURCE_DIR}/engines/OpenVINOEngine/src/utils/args_helper.cpp
    ${CMAKE_SOURCE_DIR}/engines/OpenVINOEngine/src/utils/common.cpp
)

target_include_directories(ANSFR-UnitTest PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_SOURCE_DIR}/modules/ANSFR
    ${CMAKE_SOURCE_DIR}/modules/ANSODEngine
    ${CMAKE_SOURCE_DIR}/modules/ANSODEngine/CUDA
    ${CMAKE_SOURCE_DIR}/modules/ANSCV
    ${CMAKE_SOURCE_DIR}/modules/ANSMOT
    ${CMAKE_SOURCE_DIR}/engines/ONNXEngine
    ${CMAKE_SOURCE_DIR}/engines/OpenVINOEngine/include
    ${CMAKE_SOURCE_DIR}/engines/OpenVINOEngine/include/faceapp
    ${CMAKE_SOURCE_DIR}/engines/TensorRTAPI/include
    ${CMAKE_SOURCE_DIR}/MediaClient
    ${CMAKE_SOURCE_DIR}/MediaClient/media
    ${CMAKE_SOURCE_DIR}/MediaClient/rtsp
    ${CMAKE_SOURCE_DIR}/MediaClient/rtp
    ${CMAKE_SOURCE_DIR}/MediaClient/bm
    ${CMAKE_SOURCE_DIR}/MediaClient/http
    ${CMAKE_SOURCE_DIR}/MediaClient/directx
    ${CMAKE_SOURCE_DIR}/MediaClient/rtmp
    ${CMAKE_SOURCE_DIR}/MediaClient/librtmp
    ${CMAKE_SOURCE_DIR}/MediaClient/srt
    ${CMAKE_SOURCE_DIR}/MediaClient/ffmpeg/include
    ${CMAKE_SOURCE_DIR}/MediaClient/openssl/include
    ${CMAKE_SOURCE_DIR}/MediaClient/libsrt/include
    ${SHARED_INCLUDE_DIR}
    ${ANSLIBS_DIR}/TurboJpeg
    ${ANSLIBS_DIR}/faiss
    ${ANSLIBS_DIR}/TensorRT/include
    ${ANSLIBS_DIR}/fastdeploy_gpu/include
    ${ANSLIBS_DIR}/nlohmann
)

target_link_libraries(ANSFR-UnitTest
    PRIVATE ANSFR
    PRIVATE ANSODEngine
    PRIVATE ANSCV
    PRIVATE ANSLicensingSystem
    PRIVATE anslicensing
    PRIVATE ANSMOT
    PRIVATE opencv
    PRIVATE onnxruntime
    PRIVATE openvino
    PRIVATE boost
    PRIVATE CUDA::cudart
    PRIVATE CUDA::cudart_static
    PRIVATE CUDA::cublas
    PRIVATE CUDA::cublasLt
    PRIVATE CUDA::nvjpeg
)

if(WIN32)
    target_link_libraries(ANSFR-UnitTest PRIVATE ${WIN_COMMON_LIBS})
endif()

target_compile_definitions(ANSFR-UnitTest PRIVATE UNICODE _UNICODE)
