Sono un noob totale riguardante cmake. I miei CMakeLists è davvero fondamentale:cmake non collega ncurses
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)
quando faccio il linker non trova i comandi ncurses e in modalità verbose del make vedo che il compilatore non aggiungere i -lncurses. Cosa devo aggiungere alle CMakeLists per farlo funzionare?
Non impostare EXECUTABLE_OUTPUT_PATH rispetto al PROJECT_SOURCE_DIR in quanto ciò rende impossibile eseguire una corretta out-of-albero costruisce. – datenwolf