reactos/drivers/storage/class/disk_new/CMakeLists.txt
Victor Perevertkin f144b8c10d
[DISK_NEW] Import Microsoft Disk class driver from GitHub
The source code is licensed under MS-PL license, taken from Windows Driver Samples
repository (https://github.com/microsoft/Windows-driver-samples/tree/master/storage/class/disk/)
Synched with commit 3428c5feaac7c1a5e2a09db0ed93392f7568f9e6
The driver is written for Windows 8+, so we compile it with ntoskrnl_vista
statically linked and with NTDDI_WIN8 defined

CORE-17129
2020-08-30 03:43:14 +03:00

33 lines
823 B
CMake

remove_definitions(-D_WIN32_WINNT=0x502)
list(APPEND SOURCE
data.c
disk.c
diskwmi.c
geometry.c
pnp.c
disk.h)
add_library(disk MODULE ${SOURCE} disk.rc)
target_compile_definitions(disk PUBLIC
DEBUG_USE_KDPRINT
_WIN32_WINNT=0x602
NTDDI_VERSION=0x06020000) # NTDDI_WIN8
if(USE_CLANG_CL OR (NOT MSVC))
target_compile_options(disk PRIVATE -Wno-format -Wno-pointer-sign)
endif()
if(GCC)
target_compile_options(disk PRIVATE -Wno-unused-but-set-variable -Wno-pointer-to-int-cast -Wno-switch)
endif()
set_module_type(disk kernelmodedriver)
target_link_libraries(disk ntoskrnl_vista libcntpr wdmguid)
add_importlibs(disk classpnp ntoskrnl hal)
add_cd_file(TARGET disk DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_registry_inf(disk_reg.inf)
add_driver_inf(disk disk.inf)