reactos/drivers/storage/class/classpnp/CMakeLists.txt
Victor Perevertkin bf1b3cb175
[CLASSPNP] Import Microsoft SCSI 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/classpnp/)
Synched with commit 88541f70c4273ecd30c8c7c72135bc038a00fd88
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-29 06:06:22 +03:00

52 lines
1.2 KiB
CMake

spec2def(classpnp.sys classpnp.spec ADD_IMPORTLIB)
remove_definitions(-D_WIN32_WINNT=0x502)
list(APPEND SOURCE
autorun.c
class.c
classwmi.c
clntirp.c
create.c
data.c
debug.c
dictlib.c
dispatch.c
guid.c
history.c
lock.c
obsolete.c
power.c
retry.c
srblib.c
utils.c
xferpkt.c)
add_library(classpnp MODULE
${SOURCE}
class.rc
${CMAKE_CURRENT_BINARY_DIR}/classpnp.def)
target_compile_definitions(classpnp PUBLIC
DEBUG_USE_KDPRINT
_WIN32_WINNT=0x602
NTDDI_VERSION=0x06020000) # NTDDI_WIN8
target_compile_definitions(classpnp PRIVATE
CLASS_GLOBAL_BREAK_ON_LOST_IRPS=0
CLASS_GLOBAL_SECONDS_TO_WAIT_FOR_SYNCHRONOUS_SRB=100
CLASS_GLOBAL_USE_DELAYED_RETRY=1
CLASS_GLOBAL_BUFFERED_DEBUG_PRINT=0
CLASS_GLOBAL_BUFFERED_DEBUG_PRINT_BUFFER_SIZE=512
CLASS_GLOBAL_BUFFERED_DEBUG_PRINT_BUFFERS=512)
if(GCC)
target_compile_options(classpnp PRIVATE -Wno-unused-but-set-variable -Wno-pointer-to-int-cast -Wno-switch)
endif()
set_module_type(classpnp kernelmodedriver)
target_link_libraries(classpnp ntoskrnl_vista libcntpr ${PSEH_LIB})
add_importlibs(classpnp ntoskrnl hal)
add_cd_file(TARGET classpnp DESTINATION reactos/system32/drivers NO_CAB FOR all)