add_library(owe-audio-response STATIC AudioResponse.cpp)
target_sources(owe-audio-response
    PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES AudioResponse.cppm)
target_link_libraries(owe-audio-response PUBLIC owe-fft rstd::rstd)
target_compile_features(owe-audio-response PUBLIC cxx_std_20)
set_property(TARGET owe-audio-response PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET owe-audio-response PROPERTY CXX_SCAN_FOR_MODULES ON)

if(BUILD_TESTS)
    add_executable(owe-audio-response-tests ../../tests/AudioResponseTests.cpp)
    target_link_libraries(owe-audio-response-tests PRIVATE owe-audio-response)
    target_compile_features(owe-audio-response-tests PRIVATE cxx_std_20)
    set_property(TARGET owe-audio-response-tests PROPERTY CXX_SCAN_FOR_MODULES ON)
    add_test(NAME owe-audio-response-tests COMMAND owe-audio-response-tests)
endif()
