-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
163 lines (158 loc) · 7.32 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
cmake_minimum_required(VERSION 3.0)
project(42sh C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W -Wall -Wextra -Wunused-function")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR})
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/my)
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/vec)
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/str)
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/hmap)
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/json)
link_directories(
${PROJECT_SOURCE_DIR}/lib/my
${PROJECT_SOURCE_DIR}/lib/vec
${PROJECT_SOURCE_DIR}/lib/str
${PROJECT_SOURCE_DIR}/lib/hmap
${PROJECT_SOURCE_DIR}/lib/json
)
add_executable(42sh
${PROJECT_SOURCE_DIR}/src/alias/alias.c
${PROJECT_SOURCE_DIR}/src/alias/edit.c
${PROJECT_SOURCE_DIR}/src/alias/parse.c
${PROJECT_SOURCE_DIR}/src/alias/unalias.c
${PROJECT_SOURCE_DIR}/src/autocompletion.c
${PROJECT_SOURCE_DIR}/src/buffer.c
${PROJECT_SOURCE_DIR}/src/builtins.c
${PROJECT_SOURCE_DIR}/src/builtins/alias.c
${PROJECT_SOURCE_DIR}/src/builtins/cd.c
${PROJECT_SOURCE_DIR}/src/builtins/config.c
${PROJECT_SOURCE_DIR}/src/builtins/dualcast.c
${PROJECT_SOURCE_DIR}/src/builtins/echo.c
${PROJECT_SOURCE_DIR}/src/builtins/env.c
${PROJECT_SOURCE_DIR}/src/builtins/exec.c
${PROJECT_SOURCE_DIR}/src/builtins/exit.c
${PROJECT_SOURCE_DIR}/src/builtins/expand.c
${PROJECT_SOURCE_DIR}/src/builtins/parserll.c
${PROJECT_SOURCE_DIR}/src/builtins/prompt.c
${PROJECT_SOURCE_DIR}/src/builtins/set.c
${PROJECT_SOURCE_DIR}/src/builtins/setenv.c
${PROJECT_SOURCE_DIR}/src/builtins/unalias.c
${PROJECT_SOURCE_DIR}/src/builtins/history.c
${PROJECT_SOURCE_DIR}/src/builtins/builtins.c
${PROJECT_SOURCE_DIR}/src/builtins/unset.c
${PROJECT_SOURCE_DIR}/src/builtins/unsetenv.c
${PROJECT_SOURCE_DIR}/src/builtins/where.c
${PROJECT_SOURCE_DIR}/src/builtins/which.c
${PROJECT_SOURCE_DIR}/src/char.c
${PROJECT_SOURCE_DIR}/src/comment.c
${PROJECT_SOURCE_DIR}/src/config/config.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/add_env_http.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/client.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/com_serv.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/config.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/decode.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/exec_cmd_http.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/exit.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/get_env.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/get_file_http.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/get_info_pc.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/get_request.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/init_connection.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/int_toc.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/my_split_char.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/my_split_mulchar.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/my_split.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/navigator.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/prompt.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/response.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/send_env.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/send_file_http.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/send_info.c
${PROJECT_SOURCE_DIR}/src/config-deprecated/send_mime.c
${PROJECT_SOURCE_DIR}/src/dualcast.c
${PROJECT_SOURCE_DIR}/src/dualcast/com_sock.c
${PROJECT_SOURCE_DIR}/src/dualcast/connect.c
${PROJECT_SOURCE_DIR}/src/dualcast/core_client.c
${PROJECT_SOURCE_DIR}/src/dualcast/core_server.c
${PROJECT_SOURCE_DIR}/src/dualcast/get_password.c
${PROJECT_SOURCE_DIR}/src/dualcast/init_dualcast.c
${PROJECT_SOURCE_DIR}/src/dualcast/prompt_client.c
${PROJECT_SOURCE_DIR}/src/dualcast/prompt_serv.c
${PROJECT_SOURCE_DIR}/src/dualcast/response_serv.c
${PROJECT_SOURCE_DIR}/src/dualcast/term_emul.c
${PROJECT_SOURCE_DIR}/src/dualcast/termio.c
${PROJECT_SOURCE_DIR}/src/dualcast/wait_connection.c
${PROJECT_SOURCE_DIR}/src/env/env.c
${PROJECT_SOURCE_DIR}/src/env/env2.c
${PROJECT_SOURCE_DIR}/src/exec/exec.c
${PROJECT_SOURCE_DIR}/src/exec/exec2.c
${PROJECT_SOURCE_DIR}/src/exec/pipe.c
${PROJECT_SOURCE_DIR}/src/exec/redirects.c
${PROJECT_SOURCE_DIR}/src/format.c
${PROJECT_SOURCE_DIR}/src/free.c
${PROJECT_SOURCE_DIR}/src/get_next_line.c
${PROJECT_SOURCE_DIR}/src/globbing/globbing.c
${PROJECT_SOURCE_DIR}/src/globbing/history.c
${PROJECT_SOURCE_DIR}/src/globbing/stars.c
${PROJECT_SOURCE_DIR}/src/history.c
${PROJECT_SOURCE_DIR}/src/home.c
${PROJECT_SOURCE_DIR}/src/init.c
${PROJECT_SOURCE_DIR}/src/is/is.c
${PROJECT_SOURCE_DIR}/src/launch_config.c
${PROJECT_SOURCE_DIR}/src/magic/construct.c
${PROJECT_SOURCE_DIR}/src/magic/magic.c
${PROJECT_SOURCE_DIR}/src/misc.c
${PROJECT_SOURCE_DIR}/src/my_sh.c
${PROJECT_SOURCE_DIR}/src/parse/bufferize.c
${PROJECT_SOURCE_DIR}/src/parse/error.c
${PROJECT_SOURCE_DIR}/src/parse/line.c
${PROJECT_SOURCE_DIR}/src/parse/parse.c
${PROJECT_SOURCE_DIR}/src/parse/redirects.c
${PROJECT_SOURCE_DIR}/src/parser_ll/ast_arg.c
${PROJECT_SOURCE_DIR}/src/parser_ll/ast_lvl_build_branch.c
${PROJECT_SOURCE_DIR}/src/parser_ll/ast_lvl.c
${PROJECT_SOURCE_DIR}/src/parser_ll/ast.c
${PROJECT_SOURCE_DIR}/src/parser_ll/parse.c
${PROJECT_SOURCE_DIR}/src/parser_ll/print_ast.c
${PROJECT_SOURCE_DIR}/src/parser_ll/set/arg.c
${PROJECT_SOURCE_DIR}/src/parser_ll/set/op_high.c
${PROJECT_SOURCE_DIR}/src/parser_ll/set/op_low.c
${PROJECT_SOURCE_DIR}/src/parser_ll/set/redir.c
${PROJECT_SOURCE_DIR}/src/parser_ll/token.c
${PROJECT_SOURCE_DIR}/src/path/path.c
${PROJECT_SOURCE_DIR}/src/path/path2.c
${PROJECT_SOURCE_DIR}/src/prompt.c
${PROJECT_SOURCE_DIR}/src/prompt/bash.c
${PROJECT_SOURCE_DIR}/src/prompt/bigmac.c
${PROJECT_SOURCE_DIR}/src/prompt/get_cur_branch.c
${PROJECT_SOURCE_DIR}/src/prompt/ketchup.c
${PROJECT_SOURCE_DIR}/src/prompt/mechanics/actions.c
${PROJECT_SOURCE_DIR}/src/prompt/mechanics/advanced.c
${PROJECT_SOURCE_DIR}/src/prompt/mechanics/char.c
${PROJECT_SOURCE_DIR}/src/prompt/mechanics/cursor.c
${PROJECT_SOURCE_DIR}/src/prompt/mechanics/editor.c
${PROJECT_SOURCE_DIR}/src/prompt/mechanics/load_file.c
${PROJECT_SOURCE_DIR}/src/prompt/mechanics/misc.c
${PROJECT_SOURCE_DIR}/src/prompt/mechanics/prompt.c
${PROJECT_SOURCE_DIR}/src/prompt/mechanics/sauv.c
${PROJECT_SOURCE_DIR}/src/prompt/minimalist.c
${PROJECT_SOURCE_DIR}/src/prompt/mysh_256.c
${PROJECT_SOURCE_DIR}/src/prompt/mysh_arrow.c
${PROJECT_SOURCE_DIR}/src/prompt/mysh_lambda.c
${PROJECT_SOURCE_DIR}/src/prompt/mysh.c
${PROJECT_SOURCE_DIR}/src/prompt/oh_my_zsh.c
${PROJECT_SOURCE_DIR}/src/prompt/ps1.c
${PROJECT_SOURCE_DIR}/src/prompt/tcsh.c
${PROJECT_SOURCE_DIR}/src/prompt/turbosh.c
${PROJECT_SOURCE_DIR}/src/redirects.c
${PROJECT_SOURCE_DIR}/src/reports/quotes.c
${PROJECT_SOURCE_DIR}/src/reports/parentheses.c
${PROJECT_SOURCE_DIR}/src/reports/redirects.c
${PROJECT_SOURCE_DIR}/src/sanitizers.c
)
target_link_libraries(42sh my json hmap vec str ncurses)
target_include_directories(42sh PRIVATE
${PROJECT_SOURCE_DIR}/include
)
target_compile_definitions(42sh PRIVATE _GNU_SOURCE)
install(TARGETS 42sh DESTINATION bin)