1
2remove_definitions(-D_WIN32_WINNT=0x502)
3
4list(APPEND SOURCE
5    aacs.c
6    autorun.c
7    cdrom.c
8    common.c
9    data.c
10    guid.c
11    init.c
12    ioctl.c
13    mmc.c
14    pnppower.c
15    scratch.c
16    sense.c
17    zpodd.c
18    cdrom.h)
19
20add_library(cdrom MODULE ${SOURCE} cdrom.rc)
21set_module_type(cdrom kernelmodedriver)
22
23if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
24    target_compile_options(cdrom PRIVATE -Wno-format -Wno-unused-variable -Wno-pointer-sign)
25    target_compile_options(cdrom PRIVATE -Wno-unknown-pragmas -Wno-incompatible-pointer-types -Wno-switch)
26endif()
27
28if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
29    target_compile_options(cdrom PRIVATE -Wno-enum-conversion -Wno-tautological-constant-compare)
30endif()
31
32target_compile_definitions(cdrom PRIVATE DEBUG_USE_KDPRINT)
33
34target_link_libraries(cdrom wdf01000 ntoskrnl_vista libcntpr ${PSEH_LIB})
35add_importlibs(cdrom ntoskrnl hal)
36# add_pch(cdrom cdrom.h SOURCE)
37add_cd_file(TARGET cdrom DESTINATION reactos/system32/drivers NO_CAB FOR all)
38add_registry_inf(cdrom_reg.inf)
39add_driver_inf(cdrom cdrom.inf)
40