From 6469fdd63256675602fd6a50961b40870e87fff5 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Wed, 26 Mar 2025 15:31:11 +0300 Subject: MIDIPlay: Enable terminal hotkeys independently from song switching debug mode --- utils/midiplay/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'utils/midiplay/CMakeLists.txt') diff --git a/utils/midiplay/CMakeLists.txt b/utils/midiplay/CMakeLists.txt index 1d68f47..4ac16d7 100644 --- a/utils/midiplay/CMakeLists.txt +++ b/utils/midiplay/CMakeLists.txt @@ -30,6 +30,8 @@ if(WIN32 AND NOT USE_SDL2_AUDIO) endif() option(DEBUG_SONG_SWITCHING "Enable song switching by left and right keys (Linux only)" OFF) +option(ENABLE_TERMINAL_HOTKEYS "Enable use of ncurses library to handle keyboard actions" OFF) +option(TERMINAL_USE_NCURSES "Enable use of ncurses library to handle keyboard actions" OFF) add_executable(adlmidiplay ${ADLMIDI_PLAY_SRC}) @@ -51,6 +53,15 @@ if(MIDIPLAY_WAVE_ONLY) message("Demo tool will only output WAVE file, no playing support.") endif() +if(ENABLE_TERMINAL_HOTKEYS) + target_compile_definitions(adlmidiplay PUBLIC ENABLE_TERMINAL_HOTKEYS) +endif() + +if(TERMINAL_USE_NCURSES) + target_compile_definitions(adlmidiplay PUBLIC TERMINAL_USE_NCURSES) + target_link_libraries(adlmidiplay PRIVATE ncurses) +endif() + if(ADLMIDI_DOS) target_compile_definitions(adlmidiplay PUBLIC HARDWARE_OPL3) message("Turn on hardware OPL3 support on demo tool") -- cgit v1.2.3