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
cmake_minimum_required(VERSION 3.13)
add_library(lwext4 STATIC)
add_library(lwext4::lwext4 ALIAS lwext4)
set( CONFIG_DEBUG_PRINTF ${LWEXT4_DEBUG_PRINTF})
set( CONFIG_DEBUG_ASSERT ${LWEXT4_DEBUG_ASSERT})
target_include_directories(lwext4
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/lwext4/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
)
target_compile_options(lwext4
PRIVATE
-Wno-format
-Wno-stringop-truncation
)
target_sources(lwext4
PRIVATE
lwext4/src/ext4_balloc.c
lwext4/src/ext4_bcache.c
lwext4/src/ext4_bitmap.c
lwext4/src/ext4_blockdev.c
lwext4/src/ext4_block_group.c
lwext4/src/ext4.c
lwext4/src/ext4_crc32.c
lwext4/src/ext4_debug.c
lwext4/src/ext4_dir.c
lwext4/src/ext4_dir_idx.c
lwext4/src/ext4_extent.c
lwext4/src/ext4_fs.c
lwext4/src/ext4_hash.c
lwext4/src/ext4_ialloc.c
lwext4/src/ext4_inode.c
lwext4/src/ext4_journal.c
lwext4/src/ext4_mbr.c
lwext4/src/ext4_mkfs.c
lwext4/src/ext4_super.c
lwext4/src/ext4_trans.c
lwext4/src/ext4_xattr.c
PUBLIC
lwext4/include/ext4_balloc.h
lwext4/include/ext4_bcache.h
lwext4/include/ext4_bitmap.h
lwext4/include/ext4_blockdev.h
lwext4/include/ext4_block_group.h
lwext4/include/ext4_config.h
lwext4/include/ext4_crc32.h
lwext4/include/ext4_debug.h
lwext4/include/ext4_dir.h
lwext4/include/ext4_dir_idx.h
lwext4/include/ext4_errno.h
lwext4/include/ext4_extent.h
lwext4/include/ext4_fs.h
lwext4/include/ext4.h
lwext4/include/ext4_hash.h
lwext4/include/ext4_ialloc.h
lwext4/include/ext4_inode.h
lwext4/include/ext4_journal.h
lwext4/include/ext4_mbr.h
lwext4/include/ext4_misc.h
lwext4/include/ext4_mkfs.h
lwext4/include/ext4_oflags.h
lwext4/include/ext4_super.h
lwext4/include/ext4_trans.h
lwext4/include/ext4_types.h
lwext4/include/ext4_xattr.h
lwext4/include/misc/queue.h
lwext4/include/misc/tree.h
)
configure_file( ext4_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/generated/ext4_config.h @ONLY)