1
2
3include_directories(
4    BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
5    inc)
6
7#add_definitions(-D_DEBUG)
8
9list(APPEND SOURCE
10    atacmd_map.cpp
11    bm_devs.cpp
12    id_ata.cpp
13    id_badblock.cpp
14    id_dma.cpp
15    id_init.cpp
16    id_probe.cpp
17    id_queue.cpp
18    id_sata.cpp
19    ros_glue/ros_glue.cpp
20    stdafx.h)
21
22add_library(uniata MODULE ${SOURCE} idedma.rc)
23
24if(MSVC)
25    # Disable warning C4267: '=': conversion from 'size_t' to 'USHORT', possible loss of data
26    # Disable warning C4838: conversion from 'int' to 'ULONG' requires a narrowing conversion
27    target_compile_options(uniata PRIVATE /wd4267 /wd4838)
28endif()
29
30if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
31    target_compile_options(uniata PRIVATE -Wno-narrowing -Wno-unused-but-set-variable)
32endif()
33
34if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
35    target_compile_options(uniata PRIVATE -Wno-unused-const-variable)
36endif()
37
38add_pch(uniata stdafx.h SOURCE)
39set_module_type(uniata kernelmodedriver)
40add_importlibs(uniata scsiport ntoskrnl hal)
41add_cd_file(TARGET uniata DESTINATION reactos/system32/drivers NO_CAB FOR all)
42add_registry_inf(uniata_reg.inf)
43add_driver_inf(uniata uniata_comm.inf)
44