forked from adrienpsl/fdF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
101 lines (84 loc) · 2.71 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
cmake_minimum_required(VERSION 3.9.4)
set(PROJECT_NAME fdf)
#*------------------------------------*\
# -- NAME PROJET --
#*------------------------------------*/
project(${PROJECT_NAME} C)
#*------------------------------------*\
# -- COMPILATEUR OPTION --
#*------------------------------------*/
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_COMPILER "/usr/bin/gcc")
set(CMAKE_C_FLAGS "-Wall -Wextra -Werror")
#*------------------------------------*\
# -- PATH --
#*------------------------------------*/
set(REPO "project")
set(LIBFT "${REPO}/libft")
#*------------------------------------*\
# -- THE HEADERS --
#*------------------------------------*/
file(GLOB head "${REPO}/includes/*.h")
#include_directories("${REPO}/includes/*.h")
#*------------------------------------*\
# -- LIB FT FILE --
#*------------------------------------*/
file(GLOB sources0 "${LIBFT}/src/*.c")
file(GLOB sources1 "${LIBFT}/src/**/*.c")
file(GLOB sources2 "${LIBFT}/src/**/**/*.c")
file(GLOB sources3 "${LIBFT}/src/**/**/**/*.c")
file(GLOB sources4 "${LIBFT}/src/**/**/**/**/*.c")
file(GLOB sources5 "${LIBFT}/**/**/**/**/**/*.c")
file(GLOB sources6 "${LIBFT}/test/*.c")
#*------------------------------------*\
# -- PROJET FILE --
#*------------------------------------*/
file(GLOB sources00 "${REPO}/src/*.c")
file(GLOB sources01 "${REPO}/**/*.c")
file(GLOB sources02 "${REPO}/**/**/*.c")
file(GLOB sources03 "${REPO}/**/**/**/*.c")
file(GLOB sources04 "${REPO}/**/**/**/**/*.c")
file(GLOB sources05 "${REPO}/**/**/**/**/**/*.c")
#*------------------------------------*\
# -- TEST FILE --
#*------------------------------------*/
file(GLOB sources06 "test/*.c")
#file(GLOB sources07 "includes/*.c")
#file(GLOB sources08 "includes/*.h")
#*------------------------------------*\
# -- MIXE ALL SOURCES --
#*------------------------------------*/
set(
sources
${sources0}
${sources1}
${sources2}
${sources3}
${sources4}
${sources5}
${sources6}
${sources00}
${sources01}
${sources02}
${sources03}
${sources04}
${sources05}
${sources06}
# ${sources07}
# ${sources08}
project/src/trace_tab.c)
#*------------------------------------*\
# -- ADD TO PROGRAMME --
#*------------------------------------*/
add_executable(
${PROJECT_NAME}
main.c
${sources}
${head}
)
#*------------------------------------*\
# -- LINK OTHER LIB --
#*------------------------------------*/
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/mlx/libmlx.a)
target_link_libraries(${PROJECT_NAME} "-framework OpenGL")
target_link_libraries(${PROJECT_NAME} "-framework AppKit")