22d4d21ae4bc88c74751216514bc99c00aeed104
[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/ExDoubleList.c
19 ntos_ex/ExHardError.c
20 ntos_ex/ExInterlocked.c
21 ntos_ex/ExPools.c
22 ntos_ex/ExResource.c
23 ntos_ex/ExSingleList.c
24 ntos_ex/ExTimer.c
25 ntos_fsrtl/FsRtlExpression.c
26 ntos_io/IoDeviceInterface.c
27 ntos_io/IoIrp.c
28 ntos_io/IoMdl.c
29 ntos_ke/KeApc.c
30 ntos_ke/KeDpc.c
31 ntos_ke/KeIrql.c
32 ntos_ke/KeProcessor.c
33 ntos_ke/KeSpinLock.c
34 ntos_ob/ObCreate.c
35 rtl/RtlMemory.c
36
37 kmtest_drv/kmtest_drv.rc)
38
39 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
40
41 set_module_type(kmtest_drv kernelmodedriver)
42 target_link_libraries(kmtest_drv kmtest_printf ${PSEH_LIB})
43 add_importlibs(kmtest_drv ntoskrnl hal)
44 set_property(TARGET kmtest_drv PROPERTY COMPILE_DEFINITIONS KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
45
46 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
47
48 add_library(kmtest_printf
49 kmtest_drv/printf_stubs.c
50 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c)
51 set_property(TARGET kmtest_printf PROPERTY COMPILE_DEFINITIONS _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
52 set_property(TARGET kmtest_printf PROPERTY INCLUDE_DIRECTORIES ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
53
54 #
55 # kmtest.exe loader application
56 #
57 set_rc_compiler()
58
59 list(APPEND KMTEST_SOURCE
60 kmtest/kmtest.c
61 kmtest/service.c
62 kmtest/support.c
63 kmtest/testlist.c
64
65 example/Example_user.c
66 rtl/RtlMemory.c
67
68 kmtest/kmtest.rc)
69
70 add_executable(kmtest ${KMTEST_SOURCE})
71 set_module_type(kmtest win32cui)
72 add_importlibs(kmtest advapi32 msvcrt kernel32)
73 set_property(TARGET kmtest PROPERTY COMPILE_DEFINITIONS KMT_USER_MODE)
74
75 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)