diff options
author | Wohlstand <admin@wohlnet.ru> | 2025-03-26 15:31:11 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2025-03-26 15:31:11 +0300 |
commit | 6469fdd63256675602fd6a50961b40870e87fff5 (patch) | |
tree | 508b757aebd912e253adca417f4f31fbc282a6e7 /utils/midiplay/CMakeLists.txt | |
parent | 99bb9e2d7079bb92c7e0d4bf111d360b3f783766 (diff) | |
download | libADLMIDI-6469fdd63256675602fd6a50961b40870e87fff5.tar.gz libADLMIDI-6469fdd63256675602fd6a50961b40870e87fff5.tar.bz2 libADLMIDI-6469fdd63256675602fd6a50961b40870e87fff5.zip |
MIDIPlay: Enable terminal hotkeys
independently from song switching debug mode
Diffstat (limited to 'utils/midiplay/CMakeLists.txt')
-rw-r--r-- | utils/midiplay/CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
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") |