-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
69 lines (59 loc) · 1.41 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
61
62
63
64
65
66
67
68
69
cmake_minimum_required(VERSION 3.28)
project(boundary C CXX)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
include(FetchContent)
FetchContent_Declare(
raylib
GIT_REPOSITORY https://github.com/raysan5/raylib.git
GIT_TAG 5.0
)
FetchContent_MakeAvailable(raylib)
FetchContent_Declare(
cimgui
GIT_REPOSITORY https://github.com/cimgui/cimgui.git
GIT_TAG docking_inter
)
set(IMGUI_STATIC ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(cimgui)
add_executable(
boundary
main.c
gui.c
prim.c
rlimgui/rlcimgui.c
euler.c
scan.c
transform.c
linalg.c
render.c
tesselate.c
tesselate.h
parse.c
parse.h
)
set_target_properties(boundary PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(boundary PRIVATE raylib cimgui)
add_custom_command(TARGET boundary POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/shaders
${CMAKE_BINARY_DIR}/shaders
)
# Unit tests
FetchContent_Declare(
unity
GIT_REPOSITORY https://github.com/ThrowTheSwitch/Unity.git
GIT_TAG v2.5.2
)
FetchContent_MakeAvailable(unity)
add_executable(
unit_tests
tests/euler_tests.c
euler.c
prim.c
scan.c
linalg.c
tesselate.c
tesselate.h
)
target_link_libraries(unit_tests PRIVATE unity)