1 2include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/drivers 3 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib 4 inc) 5 6set(ZSTD_SRC_FILES 7 zstd/entropy_common.c 8 zstd/error_private.c 9 zstd/fse_compress.c 10 zstd/fse_decompress.c 11 zstd/hist.c 12 zstd/huf_compress.c 13 zstd/huf_decompress.c 14 zstd/zstd_common.c 15 zstd/zstd_compress.c 16 zstd/zstd_compress_literals.c 17 zstd/zstd_compress_sequences.c 18 zstd/zstd_compress_superblock.c 19 zstd/zstd_ddict.c 20 zstd/zstd_decompress.c 21 zstd/zstd_decompress_block.c 22 zstd/zstd_double_fast.c 23 zstd/zstd_fast.c 24 zstd/zstd_lazy.c 25 zstd/zstd_ldm.c 26 zstd/zstd_opt.c) 27 28list(APPEND SOURCE 29 balance.c 30 blake2b-ref.c 31 boot.c 32 btrfs.c 33 cache.c 34 calcthread.c 35 compress.c 36 crc32c.c 37 create.c 38 devctrl.c 39 dirctrl.c 40 extent-tree.c 41 fastio.c 42 fileinfo.c 43 flushthread.c 44 free-space.c 45 fsctl.c 46 fsrtl.c 47 galois.c 48 guid.c 49 pnp.c 50 read.c 51 registry.c 52 reparse.c 53 scrub.c 54 search.c 55 security.c 56 sha256.c 57 send.c 58 treefuncs.c 59 volume.c 60 worker-thread.c 61 write.c 62 xxhash.c 63 ${ZSTD_SRC_FILES} 64 btrfs_drv.h) 65 66if((ARCH STREQUAL "i386") OR (ARCH STREQUAL "amd64")) 67 list(APPEND ASM_SOURCE crc32c.S xor.S) 68 add_asm_files(btrfs_asm ${ASM_SOURCE}) 69endif() 70 71add_library(btrfs MODULE ${SOURCE} ${btrfs_asm} btrfs.rc) 72 73if(MSVC) 74 # Disable warning C4267: 'function': conversion from 'size_t' to 'uint16_t', possible loss of data 75 target_compile_options(btrfs PRIVATE /wd4267) 76endif() 77 78add_definitions(-D__KERNEL__) 79set_module_type(btrfs kernelmodedriver) 80target_link_libraries(btrfs rtlver zlib_solo chkstk wdmguid ${PSEH_LIB}) 81add_importlibs(btrfs ntoskrnl hal) 82 83add_cd_file(TARGET btrfs DESTINATION reactos/system32/drivers NO_CAB FOR all) 84add_driver_inf(btrfs btrfs.inf) 85add_registry_inf(btrfs_reg.inf) 86