reactos/drivers/storage/class/cdrom_new/CMakeLists.txt
Victor Perevertkin 83b85e2124
[CDROM_NEW] Import Microsoft CDROM class driver from GitHub
The source code is licensed under MS-PL license, taken from Windows Driver Samples
repository (microsoft/Windows-driver-samples@master/storage/class/cdrom/)
Synched with commit 96eb96dfb613e4c745db6bd1f53a92fe7e2290fc
The driver is written for Windows 10 and uses KMDF so we compile it with ntoskrnl_vista
and wdf01000 statically linked (for wdf01000 this will likely be changed in future)

CORE-17129
2020-10-16 04:37:10 +03:00

42 lines
983 B
CMake

remove_definitions(-D_WIN32_WINNT=0x502)
list(APPEND SOURCE
aacs.c
autorun.c
cdrom.c
common.c
data.c
guid.c
init.c
ioctl.c
mmc.c
pnppower.c
scratch.c
sense.c
zpodd.c
cdrom.h)
add_library(cdrom MODULE ${SOURCE})
set_module_type(cdrom kernelmodedriver)
if(GCC OR CLANG)
target_compile_options(cdrom PRIVATE -Wno-format -Wno-unused-variable -Wno-pointer-sign)
endif()
if(GCC)
target_compile_options(cdrom PRIVATE -Wno-unknown-pragmas -Wno-incompatible-pointer-types -Wno-switch)
endif()
if(CLANG)
target_compile_options(cdrom PRIVATE -Wno-enum-conversion -Wno-tautological-constant-compare)
endif()
target_compile_definitions(cdrom PRIVATE DEBUG_USE_KDPRINT)
target_link_libraries(cdrom wdf01000 ntoskrnl_vista libcntpr ${PSEH_LIB})
add_importlibs(cdrom ntoskrnl hal)
# add_pch(cdrom cdrom.h SOURCE)
add_cd_file(TARGET cdrom DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_driver_inf(cdrom cdrom.inf)