~riderius/cpp-code

a2904a0ceb52a8a1f00814960ce1c003bcef529b — RIDERIUS 6 months ago e07cd8b
Added improved work with curses library
1 files changed, 10 insertions(+), 2 deletions(-)

M CMakeLists.txt
M CMakeLists.txt => CMakeLists.txt +10 -2
@@ 21,5 21,13 @@ add_executable(Mstat math_stat.cpp)

# Curses progs

add_executable(screensaver screensaver.cpp)
target_link_libraries(screensaver ncursesw)
set(CURSES_NEED_NCURSES, TRUE)
set(CURSES_NEED_WIDE, TRUE)
find_package(Curses)
if(CURSES_FOUND)
    include_directories(${CURSES_INCLUDE_DIRS})
    add_executable(screensaver screensaver.cpp)
    target_link_libraries(screensaver ${CURSES_LIBRARY})
else()
    message(WARNING "Failed to find ncursesw. Curses programs do not compile.")
endif()