if(NOT WIN32 OR NOT MSIME_VOICE_CAPTURE)
    message(FATAL_ERROR "The Windows host requires Windows and MSIME_VOICE_CAPTURE")
endif()
find_package(fmt CONFIG REQUIRED)
find_package(tomlplusplus CONFIG REQUIRED)
add_executable(MetasequoiaVoiceInput WIN32 src/main.cpp src/cue_player.cpp src/mvi_config.cpp src/mvi_utils.cpp src/send_input.cpp src/wave_overlay.cpp src/tray_ui.cpp src/resource/app.rc)
target_compile_definitions(MetasequoiaVoiceInput PRIVATE UNICODE _UNICODE NOMINMAX)
target_compile_options(MetasequoiaVoiceInput PRIVATE /utf-8)
target_link_options(MetasequoiaVoiceInput PRIVATE /ENTRY:mainCRTStartup)
target_include_directories(MetasequoiaVoiceInput PRIVATE src src/resource ../../third_party/miniaudio)
target_link_libraries(MetasequoiaVoiceInput PRIVATE MetasequoiaIme::Voice MetasequoiaIme::VoiceCapture fmt::fmt nlohmann_json::nlohmann_json tomlplusplus::tomlplusplus d2d1 User32 dwmapi shell32)
