1
2remove_definitions(-D_WIN32_WINNT=0x502)
3
4list(APPEND SOURCE
5    data.c
6    disk.c
7    diskwmi.c
8    geometry.c
9    pnp.c
10    disk.h)
11
12add_library(disk MODULE ${SOURCE} disk.rc)
13
14target_compile_definitions(disk PUBLIC
15    DEBUG_USE_KDPRINT
16    _WIN32_WINNT=0x602
17    NTDDI_VERSION=0x06020000) # NTDDI_WIN8
18
19if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
20    target_compile_options(disk PRIVATE -Wno-format -Wno-pointer-sign)
21    target_compile_options(disk PRIVATE -Wno-pointer-to-int-cast -Wno-switch)
22endif()
23
24if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
25    target_compile_options(disk PRIVATE -Wno-unused-but-set-variable)
26endif()
27
28set_module_type(disk kernelmodedriver)
29target_link_libraries(disk ntoskrnl_vista libcntpr wdmguid)
30add_importlibs(disk classpnp ntoskrnl hal)
31add_cd_file(TARGET disk DESTINATION reactos/system32/drivers NO_CAB FOR all)
32add_registry_inf(disk_reg.inf)
33add_driver_inf(disk disk.inf)
34