-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
60 lines (48 loc) · 1.4 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
cmake_minimum_required(VERSION 3.16)
project(EvacuationC LANGUAGES C VERSION 0.1.0)
option(build_tests "Build all of own tests" OFF)
set(CMAKE_VERBOSE_MAKEFILE TRUE)
set(CMAKE_C_FLAGS "-std=gnu11 -W -Wall -Wextra -Wparentheses -Wshadow -funsigned-char")
set(CMAKE_C_FLAGS_DEBUG "-g -O0 -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE "-O3")
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
add_executable(${PROJECT_NAME}
src/bim_tools.c src/bim_tools.h
src/bim_graph.c src/bim_graph.h
src/bim_evac.c src/bim_evac.h
src/bim_polygon_tools.c src/bim_polygon_tools.h
src/bim_json_object.c src/bim_json_object.h
src/bim_configure.c src/bim_configure.h
src/main.c
)
target_include_directories(${PROJECT_NAME}
PUBLIC
./thirdparty/triangle
./thirdparty/arraylist
./thirdparty/json-c
./thirdparty/c-logger
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
logger_static
triangle
pthread
arraylist
json-c
m
"-static"
)
add_subdirectory(thirdparty/triangle)
add_subdirectory(thirdparty/arraylist)
add_subdirectory(thirdparty/c-logger)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
#set(BUILD_STATIC_LIBS ON)
set(BUILD_SHARED_LIBS OFF)
add_subdirectory(thirdparty/json-c)
### Test
if(build_tests)
enable_testing()
add_subdirectory(test)
endif()