我对CMake完全是个新手。我的CMakeLists.txt
非常基础:
cmake_minimum_required(VERSION 2.4.6)
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
#For the Curses library to load:
SET(CURSES_USE_NCURSES TRUE)
include_directories(
"src/"
)
add_subdirectory(src)
当我进行编译时,链接器无法找到ncurses命令,并且在make的详细模式中,我看到编译器没有添加-lncurses
。我需要在CMakeLists中添加什么才能使它正常工作?