Skip to content

Commit

Permalink
Check for use_default_colors (abishekvashok#146) (abishekvashok#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikoof authored Mar 1, 2023
1 parent 1be222a commit ac78ef9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ find_package(Curses)
include_directories(${CURSES_INCLUDE_DIR})
add_definitions(-DHAVE_NCURSES_H)

include(CheckSymbolExists)
list(APPEND CMAKE_REQUIRED_LIBRARIES ncurses)
check_symbol_exists(use_default_colors "ncurses.h" HAVE_USE_DEFAULT_COLORS)
if (HAVE_USE_DEFAULT_COLORS)
add_definitions(-DHAVE_USE_DEFAULT_COLORS)
endif()

add_executable(cmatrix cmatrix.c)

target_link_libraries(cmatrix ${CURSES_LIBRARIES})
Expand Down

0 comments on commit ac78ef9

Please sign in to comment.