1
2include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/drivers
3                    inc)
4
5list(APPEND SOURCE
6    src/init.c
7    src/ext3/generic.c
8    src/ext3/htree.c
9    src/ext3/indirect.c
10    src/ext3/recover.c
11    src/ext4/ext4_bh.c
12    src/ext4/ext4_extents.c
13    src/ext4/ext4_jbd2.c
14    src/ext4/ext4_xattr.c
15    src/ext4/extents.c
16    src/jbd/recovery.c
17    src/jbd/replay.c
18    src/jbd/revoke.c
19    src/nls/nls_ascii.c
20    src/nls/nls_base.c
21    src/nls/nls_cp437.c
22    src/nls/nls_cp737.c
23    src/nls/nls_cp775.c
24    src/nls/nls_cp850.c
25    src/nls/nls_cp852.c
26    src/nls/nls_cp855.c
27    src/nls/nls_cp857.c
28    src/nls/nls_cp860.c
29    src/nls/nls_cp861.c
30    src/nls/nls_cp862.c
31    src/nls/nls_cp863.c
32    src/nls/nls_cp864.c
33    src/nls/nls_cp865.c
34    src/nls/nls_cp866.c
35    src/nls/nls_cp869.c
36    src/nls/nls_cp874.c
37    src/nls/nls_cp932.c
38    src/nls/nls_cp936.c
39    src/nls/nls_cp949.c
40    src/nls/nls_cp950.c
41    src/nls/nls_cp1250.c
42    src/nls/nls_cp1251.c
43    src/nls/nls_cp1255.c
44    src/nls/nls_euc-jp.c
45    src/nls/nls_iso8859-1.c
46    src/nls/nls_iso8859-2.c
47    src/nls/nls_iso8859-3.c
48    src/nls/nls_iso8859-4.c
49    src/nls/nls_iso8859-5.c
50    src/nls/nls_iso8859-6.c
51    src/nls/nls_iso8859-7.c
52    src/nls/nls_iso8859-9.c
53    src/nls/nls_iso8859-13.c
54    src/nls/nls_iso8859-14.c
55    src/nls/nls_iso8859-15.c
56    src/nls/nls_koi8-r.c
57    src/nls/nls_koi8-ru.c
58    src/nls/nls_koi8-u.c
59    src/nls/nls_utf8.c
60    src/access.c
61    src/block.c
62    src/cleanup.c
63    src/close.c
64    src/cmcb.c
65    src/create.c
66    src/debug.c
67    src/devctl.c
68    src/dirctl.c
69    src/dispatch.c
70    src/ea.c
71    src/except.c
72    src/fastio.c
73    src/fileinfo.c
74    src/flush.c
75    src/fsctl.c
76    src/linux.c
77    src/lock.c
78    src/memory.c
79    src/misc.c
80    src/nls.c
81    src/pnp.c
82    src/rbtree.c
83    src/read.c
84    src/shutdown.c
85    src/volinfo.c
86    src/write.c
87    inc/ext2fs.h)
88
89add_library(ext2fs MODULE ${SOURCE} ext2fs.rc)
90
91if(MSVC)
92    if (NOT CLANG)
93        # Disable warning C4101: 'i': unreferenced local variable
94        # Disable warning C4189: 'sbi': local variable is initialized but not referenced
95        # Disable warning C4267: '=': conversion from 'size_t' to 'USHORT', possible loss of data
96        target_compile_options(ext2fs PRIVATE /wd4101 /wd4189 /wd4267)
97    endif()
98else()
99    target_compile_options(ext2fs PRIVATE
100        -Wno-pointer-sign -Wno-unused-function
101        -Wno-unused-variable -Wno-missing-braces)
102endif()
103
104if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
105    target_compile_options(ext2fs PRIVATE -Wno-unused-but-set-variable)
106endif()
107
108if(CLANG)
109    target_compile_options(ext2fs PRIVATE
110        -Wno-unused-value -Wno-parentheses-equality
111        -Wno-incompatible-pointer-types-discards-qualifiers
112        "-Wno-#pragma-messages;-Wno-cast-calling-convention")
113endif()
114
115target_link_libraries(ext2fs memcmp ${PSEH_LIB})
116add_definitions(-D__KERNEL__ -D_CRT_NO_POSIX_ERROR_CODES)
117set_module_type(ext2fs kernelmodedriver)
118add_importlibs(ext2fs ntoskrnl hal)
119set_property(TARGET ext2fs PROPERTY C_STANDARD 90)
120add_pch(ext2fs inc/ext2fs.h SOURCE)
121
122add_cd_file(TARGET ext2fs DESTINATION reactos/system32/drivers FOR all)
123