-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
50 lines (39 loc) · 1.22 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
cmake_minimum_required(VERSION 2.8)
project(uefiui C ASM)
set(CMAKE_BUILD_TYPE Debug)
find_package(BISON)
find_package(FLEX)
# use flex from PATH
set(FLEX_EXECUTABLE flex)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wstrict-prototypes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections -Wl,-gc-sections -Os -ggdb -fno-builtin")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter")
include_directories(
include
include_posix
)
add_definitions(
-DYY_BARE_METAL
)
BISON_TARGET(uui_parser src/uui.y ${CMAKE_CURRENT_BINARY_DIR}/uui_parser.c)
FLEX_TARGET(uui_lexer src/uui.lex ${CMAKE_CURRENT_BINARY_DIR}/uui_lexer.c DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/uui_lexer.h)
ADD_FLEX_BISON_DEPENDENCY(uui_lexer uui_parser)
add_executable(main
src/main.c
src/maintest.c
src/uui/fb.c
src/uui/canvas.c
src/uui/components.c
src/uui/resources.c
src/uui/views/view.c
src/uui/views/viewgroup.c
src/uui/views/rect.c
src/uui/layouts/linear.c
src/uui/layouts/absolute.c
lib/hashmap.c
lib/strhashmap.c
${BISON_uui_parser_OUTPUTS}
${FLEX_uui_lexer_OUTPUTS}
)
target_link_libraries(main SDL)