archeus/cmake/archeus_ncurses.cmake

20 lines
738 B
CMake
Raw Permalink Normal View History

set(ARCHEUS_NCURSES_CONSOLE_SOURCES
packages/linux/console/ncurses/element.c
packages/linux/console/ncurses/key.c
packages/linux/console/ncurses/view.c
packages/linux/console/ncurses/shell.c
packages/linux/console/ncurses/buffer.c
)
function(ncurses_check_and_init_needed _ARCHEUS_FLAGS _ARCHEUS_SOURCES ARCHEUS_CONSOLE_BACKEND)
#add matching files for the selected backends
if(${ARCHEUS_CONSOLE_BACKEND} STREQUAL "NCURSES")
string(APPEND ${_ARCHEUS_FLAGS} "-lncurses ")
list(APPEND ${_ARCHEUS_SOURCES} ${ARCHEUS_NCURSES_CONSOLE_SOURCES})
endif()
set(${_ARCHEUS_FLAGS} ${${_ARCHEUS_FLAGS}} PARENT_SCOPE)
set(${_ARCHEUS_SOURCES} ${${_ARCHEUS_SOURCES}} PARENT_SCOPE)
endfunction()