-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (32 loc) · 1010 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
27
28
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required (VERSION 3.7.2)
project (cellular_automata)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -std=c++14")
set (CURSES_NEED_NCURSES TRUE)
find_package (Curses REQUIRED)
include_directories (${CURSES_INCLUDE_DIRS})
include_directories (src/)
set (AUTOMATA_SOURCES
src/automata/life.cpp
src/automata/life_like.cpp
src/automata/predator_and_prey.cpp
)
set (SCREEN_SOURCES
src/curses/screen.cpp
)
set (TEST_SOURCES
src/automata_test/life.cpp
src/automata_test/life_nocurses.cpp
src/automata_test/life_like.cpp
src/automata_test/predator_and_prey.cpp
)
add_library (automata_lib
${AUTOMATA_SOURCES}
)
add_library (screen_lib
${SCREEN_SOURCES}
)
foreach (test_source ${TEST_SOURCES})
get_filename_component (test_exec ${test_source} NAME_WE)
add_executable (${test_exec} ${test_source})
target_link_libraries (${test_exec} ${CURSES_LIBRARIES} automata_lib screen_lib)
endforeach (test_source ${TEST_SOURCES})