[KMTESTS]
[reactos.git] / kmtests / CMakeLists.txt
1 include_directories(
2 include)
3
4 #
5 # subdirectories containing special-purpose drivers
6 #
7 add_subdirectory(example)
8
9 #
10 # kmtest_drv.sys driver
11 #
12 list(APPEND KMTEST_DRV_SOURCE
13 kmtest_drv/kmtest_drv.c
14 kmtest_drv/testlist.c
15
16 example/Example.c
17 example/KernelType.c
18 ntos_ex/ExHardError.c
19 ntos_ex/ExInterlocked.c
20 ntos_ex/ExPools.c
21 ntos_ex/ExResource.c
22 ntos_ex/ExTimer.c
23 ntos_fsrtl/FsRtlExpression.c
24 ntos_io/IoDeviceInterface.c
25 ntos_io/IoIrp.c
26 ntos_io/IoMdl.c
27 ntos_ke/KeApc.c
28 ntos_ke/KeDpc.c
29 ntos_ke/KeIrql.c
30 ntos_ke/KeProcessor.c
31 ntos_ke/KeSpinLock.c
32 ntos_ob/ObCreate.c
33
34 kmtest_drv/kmtest_drv.rc)
35
36 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
37
38 set_module_type(kmtest_drv kernelmodedriver)
39 target_link_libraries(kmtest_drv kmtest_printf ${PSEH_LIB})
40 add_importlibs(kmtest_drv ntoskrnl hal)
41 set_property(TARGET kmtest_drv PROPERTY COMPILE_DEFINITIONS KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
42
43 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
44
45 add_library(kmtest_printf
46 kmtest_drv/printf_stubs.c
47 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c)
48 set_property(TARGET kmtest_printf PROPERTY COMPILE_DEFINITIONS _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
49 set_property(TARGET kmtest_printf PROPERTY INCLUDE_DIRECTORIES ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
50
51 #
52 # kmtest.exe loader application
53 #
54 set_rc_compiler()
55
56 list(APPEND KMTEST_SOURCE
57 kmtest/kmtest.c
58 kmtest/service.c
59 kmtest/support.c
60 kmtest/testlist.c
61
62 example/Example_user.c
63
64 kmtest/kmtest.rc)
65
66 add_executable(kmtest ${KMTEST_SOURCE})
67 set_module_type(kmtest win32cui)
68 add_importlibs(kmtest advapi32 msvcrt kernel32)
69 set_property(TARGET kmtest PROPERTY COMPILE_DEFINITIONS KMT_USER_MODE)
70
71 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)