[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/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/RtlAvlTree.c
36 rtl/RtlMemory.c
37 rtl/RtlSplayTree.c
38
39 kmtest_drv/kmtest_drv.rc)
40
41 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
42
43 set_module_type(kmtest_drv kernelmodedriver)
44 target_link_libraries(kmtest_drv kmtest_printf ${PSEH_LIB})
45 add_importlibs(kmtest_drv ntoskrnl hal)
46 set_property(TARGET kmtest_drv PROPERTY COMPILE_DEFINITIONS KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
47
48 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
49
50 add_library(kmtest_printf
51 kmtest_drv/printf_stubs.c
52 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c)
53 set_property(TARGET kmtest_printf PROPERTY COMPILE_DEFINITIONS _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
54 set_property(TARGET kmtest_printf PROPERTY INCLUDE_DIRECTORIES ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
55
56 #
57 # kmtest.exe loader application
58 #
59 set_rc_compiler()
60
61 list(APPEND KMTEST_SOURCE
62 kmtest/kmtest.c
63 kmtest/service.c
64 kmtest/support.c
65 kmtest/testlist.c
66
67 example/Example_user.c
68 rtl/RtlAvlTree.c
69 rtl/RtlMemory.c
70 rtl/RtlSplayTree.c
71
72 kmtest/kmtest.rc)
73
74 add_executable(kmtest ${KMTEST_SOURCE})
75 set_module_type(kmtest win32cui)
76 add_importlibs(kmtest advapi32 msvcrt kernel32 ntdll)
77 set_property(TARGET kmtest PROPERTY COMPILE_DEFINITIONS KMT_USER_MODE)
78
79 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
80
81 #
82 # Group targets
83 #
84 add_custom_target(kmtest_drivers)
85 add_dependencies(kmtest_drivers kmtest_drv example_drv)
86
87 add_custom_target(kmtest_all)
88 add_dependencies(kmtest_all kmtest_drivers kmtest)