
include_directories(../include ${EIGEN_PATH} ${LIBHARKIO3_INCLUDE_DIRS} ${HARKLIB_INCLUDE_DIRS})

add_executable(${PROJECT_NAME}-tutorial
    tutorial.cc
)
target_link_libraries(${PROJECT_NAME}-tutorial
    PUBLIC
        Eigen3::Eigen
        ${LIBHARKIO3_LIBRARIES}
        ${HARKLIB_LIBRARIES}
        ${TORCH_LIBRARIES}
)
target_compile_options(${PROJECT_NAME}-tutorial
    PUBLIC
        $<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>
)

add_executable(${PROJECT_NAME}-test-1
    test1.cc
)
target_link_libraries(${PROJECT_NAME}-test-1
    Eigen3::Eigen "${TORCH_LIBRARIES}" ${HARKLIB_LIBRARIES})
target_compile_options(${PROJECT_NAME}-test-1
    PUBLIC
        $<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>
)

add_executable(${PROJECT_NAME}-test-publish
    test-publish.cc
)
target_link_libraries(${PROJECT_NAME}-test-publish
    Eigen3::Eigen Threads::Threads "${TORCH_LIBRARIES}" ${HARKLIB_LIBRARIES})
target_compile_options(${PROJECT_NAME}-test-publish
    PUBLIC
        $<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>
)

add_executable(${PROJECT_NAME}-test-hark
    test-hark.cc
)
target_link_libraries(${PROJECT_NAME}-test-hark
    Eigen3::Eigen "${TORCH_LIBRARIES}" ${HARKLIB_LIBRARIES})
target_compile_options(${PROJECT_NAME}-test-hark
    PUBLIC
        $<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>
)

add_executable(${PROJECT_NAME}-test-semiblindica
    test-semiblindica.cc
)
target_link_libraries(${PROJECT_NAME}-test-semiblindica
    Eigen3::Eigen "${TORCH_LIBRARIES}" ${HARKLIB_LIBRARIES})
target_compile_options(${PROJECT_NAME}-test-semiblindica
    PUBLIC
        $<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>
)

add_executable(${PROJECT_NAME}-test-synthesize
    test-synthesize.cc
)
target_link_libraries(${PROJECT_NAME}-test-synthesize
    Eigen3::Eigen "${TORCH_LIBRARIES}" ${HARKLIB_LIBRARIES})
target_compile_options(${PROJECT_NAME}-test-synthesize
    PUBLIC
        $<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>
)

if(HARKLIB_USE_LIBTORCH)
    add_executable(${PROJECT_NAME}-test-vad-pyannote
        test-vad-pyannote.cc
    )

    target_link_libraries(${PROJECT_NAME}-test-vad-pyannote
        Eigen3::Eigen "${TORCH_LIBRARIES}" ${HARKLIB_LIBRARIES})

    target_compile_definitions(${PROJECT_NAME}-test-vad-pyannote
        PRIVATE
            HARKLIB_USES_LIBTORCH=1
    )

    target_compile_options(${PROJECT_NAME}-test-vad-pyannote
        PUBLIC
            $<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>
    )
endif(HARKLIB_USE_LIBTORCH)
