ca5c0d1fedacd1d4ecefbac9bb04948175fcb2de
[reactos.git] / kmtests / CMakeLists.txt
1 include_directories(
2 include)
3
4 #
5 # subdirectories containing special-purpose drivers
6 #
7 add_subdirectory(example)
8 add_subdirectory(ntos_io)
9
10 #
11 # kmtest_drv.sys driver
12 #
13 list(APPEND KMTEST_DRV_SOURCE
14 kmtest_drv/kmtest_drv.c
15 kmtest_drv/testlist.c
16
17 example/Example.c
18 example/KernelType.c
19 ntos_ex/ExDoubleList.c
20 ntos_ex/ExFastMutex.c
21 ntos_ex/ExHardError.c
22 ntos_ex/ExInterlocked.c
23 ntos_ex/ExPools.c
24 ntos_ex/ExResource.c
25 ntos_ex/ExSequencedList.c
26 ntos_ex/ExSingleList.c
27 ntos_ex/ExTimer.c
28 ntos_fsrtl/FsRtlExpression.c
29 ntos_io/IoDeviceInterface.c
30 ntos_io/IoIrp.c
31 ntos_io/IoMdl.c
32 ntos_ke/KeApc.c
33 ntos_ke/KeDpc.c
34 ntos_ke/KeEvent.c
35 ntos_ke/KeGuardedMutex.c
36 ntos_ke/KeIrql.c
37 ntos_ke/KeProcessor.c
38 ntos_ke/KeSpinLock.c
39 ntos_ob/ObType.c
40 rtl/RtlAvlTree.c
41 rtl/RtlMemory.c
42 rtl/RtlSplayTree.c
43
44 kmtest_drv/kmtest_drv.rc)
45
46 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
47
48 set_module_type(kmtest_drv kernelmodedriver)
49 target_link_libraries(kmtest_drv kmtest_printf ${PSEH_LIB})
50 add_importlibs(kmtest_drv ntoskrnl hal)
51 set_property(TARGET kmtest_drv PROPERTY COMPILE_DEFINITIONS KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
52
53 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
54
55 add_library(kmtest_printf
56 kmtest_drv/printf_stubs.c
57 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c)
58 set_property(TARGET kmtest_printf PROPERTY COMPILE_DEFINITIONS _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
59 set_property(TARGET kmtest_printf PROPERTY INCLUDE_DIRECTORIES ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
60
61 #
62 # kmtest.exe loader application
63 #
64 set_rc_compiler()
65
66 list(APPEND KMTEST_SOURCE
67 kmtest/kmtest.c
68 kmtest/service.c
69 kmtest/support.c
70 kmtest/testlist.c
71
72 example/Example_user.c
73 ntos_io/IoDeviceObject_user.c
74 rtl/RtlAvlTree.c
75 rtl/RtlMemory.c
76 rtl/RtlSplayTree.c
77
78 kmtest/kmtest.rc)
79
80 add_executable(kmtest ${KMTEST_SOURCE})
81 set_module_type(kmtest win32cui)
82 target_link_libraries(kmtest ${PSEH_LIB})
83 add_importlibs(kmtest advapi32 msvcrt kernel32 ntdll)
84 set_property(TARGET kmtest PROPERTY COMPILE_DEFINITIONS KMT_USER_MODE)
85
86 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
87
88 #
89 # Group targets
90 #
91 add_custom_target(kmtest_drivers)
92 add_dependencies(kmtest_drivers
93 kmtest_drv
94 example_drv
95 iodeviceobject_drv
96 iohelper_drv)
97
98 add_custom_target(kmtest_all)
99 add_dependencies(kmtest_all kmtest_drivers kmtest)