Skip to content

Instantly share code, notes, and snippets.

@ninovsnino
Created June 14, 2016 23:56
Show Gist options
  • Save ninovsnino/8fad362badafbee8ad5b6f70df32468c to your computer and use it in GitHub Desktop.
Save ninovsnino/8fad362badafbee8ad5b6f70df32468c to your computer and use it in GitHub Desktop.
CMake to link library, in this case is ncurses library
cmake_minimum_required(VERSION 2.8.9)
project (test_ncurses)
find_package(curses REQUIRED)
include_directories(${CURSES_INCLUDE_DIR})
file(GLOB SOURCES "*.c")
add_executable(test_ncurses ${SOURCES})
target_link_libraries(test_ncurses ${CURSES_LIBRARIES})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment