-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
26 lines (26 loc) · 996 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# specify the minimum version of CMake that is supported
cmake_minimum_required(VERSION 3.10)
# include a project name
project(minivim)
# set C++ Version & executable output path
set(CMAKE_CXX_STANDARD 17)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
# make your compiler aware of header directory
include_directories(${PROJECT_SOURCE_DIR}/include)
# find & include ncurses library
find_package(Curses REQUIRED)
include_directories(${CURSES_INCLUDE_DIR})
# create a variable which includes needed source files
set(MY_SOURCES
${PROJECT_SOURCE_DIR}/src/main.cpp
${PROJECT_SOURCE_DIR}/src/command_window.cpp
${PROJECT_SOURCE_DIR}/src/file_window.cpp
${PROJECT_SOURCE_DIR}/src/information_window.cpp
${PROJECT_SOURCE_DIR}/src/window.cpp
${PROJECT_SOURCE_DIR}/src/input_method.cpp
)
# specify an executable,
# build from the specified source files
add_executable(minivim-bin ${MY_SOURCES})
# link ncurses library with your executable
target_link_libraries(minivim-bin ${CURSES_LIBRARY})