summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 9b5fe597961a1281ded6374423cdcea5c3b8effb (plain)
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
27
28
29
30
31
# This project needs CMake version >= 2.6
cmake_minimum_required(VERSION 2.6)

# Set the project name. This will be used by CMake to name project related variables.
project(OXEN)

# Set C compiler flags
set(CMAKE_C_FLAGS "-Wall -pedantic -g -std=c99")

# Find dependencies
# Find ncurses
set(CURSES_NEED_NCURSES true)
find_package(Curses)

# Set the directory where source files are located.
set(OXEN_SOURCE_DIR ${CMAKE_SOURCE_DIR}/src)

# Include all source files recursively
file(GLOB_RECURSE OXEN_SOURCES ${OXEN_SOURCE_DIR}/*.c)

# Specify the name of our project executable and from which source files it will be built
add_executable(
	oxen
	${OXEN_SOURCES}
)

# Specify the libraries to be linked with our executable
target_link_libraries(
	oxen
	${CURSES_LIBRARIES}
)