1c2c66affSColin Finck
2c2c66affSColin Finckinclude_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/drivers
3c2c66affSColin Finck                    ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib
4c2c66affSColin Finck                    inc)
5c2c66affSColin Finck
6*06042735SVincent Franchommeset(ZSTD_SRC_FILES
7*06042735SVincent Franchomme    zstd/entropy_common.c
8*06042735SVincent Franchomme    zstd/error_private.c
9*06042735SVincent Franchomme    zstd/fse_compress.c
10*06042735SVincent Franchomme    zstd/fse_decompress.c
11*06042735SVincent Franchomme    zstd/hist.c
12*06042735SVincent Franchomme    zstd/huf_compress.c
13*06042735SVincent Franchomme    zstd/huf_decompress.c
14*06042735SVincent Franchomme    zstd/zstd_common.c
15*06042735SVincent Franchomme    zstd/zstd_compress.c
16*06042735SVincent Franchomme    zstd/zstd_compress_literals.c
17*06042735SVincent Franchomme    zstd/zstd_compress_sequences.c
18*06042735SVincent Franchomme    zstd/zstd_compress_superblock.c
19*06042735SVincent Franchomme    zstd/zstd_ddict.c
20*06042735SVincent Franchomme    zstd/zstd_decompress.c
21*06042735SVincent Franchomme    zstd/zstd_decompress_block.c
22*06042735SVincent Franchomme    zstd/zstd_double_fast.c
23*06042735SVincent Franchomme    zstd/zstd_fast.c
24*06042735SVincent Franchomme    zstd/zstd_lazy.c
25*06042735SVincent Franchomme    zstd/zstd_ldm.c
26*06042735SVincent Franchomme    zstd/zstd_opt.c)
27*06042735SVincent Franchomme
28c2c66affSColin Fincklist(APPEND SOURCE
29c2c66affSColin Finck    balance.c
30194ea909SVictor Perevertkin    blake2b-ref.c
31318da0c1SPierre Schweitzer    boot.c
32c2c66affSColin Finck    btrfs.c
33c2c66affSColin Finck    cache.c
34c2c66affSColin Finck    calcthread.c
35c2c66affSColin Finck    compress.c
36c2c66affSColin Finck    crc32c.c
37c2c66affSColin Finck    create.c
38c2c66affSColin Finck    devctrl.c
39c2c66affSColin Finck    dirctrl.c
40c2c66affSColin Finck    extent-tree.c
41c2c66affSColin Finck    fastio.c
42c2c66affSColin Finck    fileinfo.c
43c2c66affSColin Finck    flushthread.c
44c2c66affSColin Finck    free-space.c
45c2c66affSColin Finck    fsctl.c
46318da0c1SPierre Schweitzer    fsrtl.c
47c2c66affSColin Finck    galois.c
48c2c66affSColin Finck    guid.c
49c2c66affSColin Finck    pnp.c
50c2c66affSColin Finck    read.c
51c2c66affSColin Finck    registry.c
52c2c66affSColin Finck    reparse.c
53c2c66affSColin Finck    scrub.c
54c2c66affSColin Finck    search.c
55c2c66affSColin Finck    security.c
56194ea909SVictor Perevertkin    sha256.c
57c2c66affSColin Finck    send.c
58c2c66affSColin Finck    treefuncs.c
59c2c66affSColin Finck    volume.c
60c2c66affSColin Finck    worker-thread.c
61c2c66affSColin Finck    write.c
62194ea909SVictor Perevertkin    xxhash.c
63*06042735SVincent Franchomme    ${ZSTD_SRC_FILES}
64c2c66affSColin Finck    btrfs_drv.h)
65c2c66affSColin Finck
66*06042735SVincent Franchommeif((ARCH STREQUAL "i386") OR (ARCH STREQUAL "amd64"))
67*06042735SVincent Franchomme    list(APPEND ASM_SOURCE crc32c.S xor.S)
68194ea909SVictor Perevertkin    add_asm_files(btrfs_asm ${ASM_SOURCE})
69*06042735SVincent Franchommeendif()
70194ea909SVictor Perevertkin
71194ea909SVictor Perevertkinadd_library(btrfs MODULE ${SOURCE} ${btrfs_asm} btrfs.rc)
72c2c66affSColin Finck
7341bc57ddSTimo Kreuzerif(MSVC)
7441bc57ddSTimo Kreuzer    # Disable warning C4267: 'function': conversion from 'size_t' to 'uint16_t', possible loss of data
7541bc57ddSTimo Kreuzer    target_compile_options(btrfs PRIVATE /wd4267)
7641bc57ddSTimo Kreuzerendif()
7741bc57ddSTimo Kreuzer
78c2c66affSColin Finckadd_definitions(-D__KERNEL__)
79c2c66affSColin Finckset_module_type(btrfs kernelmodedriver)
80318da0c1SPierre Schweitzertarget_link_libraries(btrfs rtlver zlib_solo chkstk wdmguid ${PSEH_LIB})
81c2c66affSColin Finckadd_importlibs(btrfs ntoskrnl hal)
822c032f3fSHermès Bélusca-Maïto
8307bc92f7SVictor Perevertkinadd_cd_file(TARGET btrfs DESTINATION reactos/system32/drivers NO_CAB FOR all)
84019f21eeSVictor Perevertkinadd_driver_inf(btrfs btrfs.inf)
852c032f3fSHermès Bélusca-Maïtoadd_registry_inf(btrfs_reg.inf)
86