https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ec14b4c50af0c6ad343f9…
commit ec14b4c50af0c6ad343f9c22c53501390c446722
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed May 29 20:32:32 2019 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed May 29 20:32:32 2019 +0900
[WIN32KNT_APITEST] Split win32knt_apitest to 3 modules (#1588)
Split win32knt_apitest to 3 modules (win32knt_apitest, win32knt_xpsp2_apitest and
win32knt_2k3sp2_apitest) for usability. These 3 modules are different in linking
(win32u.dll, win32u_xpsp2.dll and win32u_2k3sp2.dll). I think it's better to separate
for clarity.
---
modules/rostests/apitests/win32nt/CMakeLists.txt | 60 +++++++++++++++++-------
1 file changed, 42 insertions(+), 18 deletions(-)
diff --git a/modules/rostests/apitests/win32nt/CMakeLists.txt
b/modules/rostests/apitests/win32nt/CMakeLists.txt
index 666f823a38..8ef26f564d 100644
--- a/modules/rostests/apitests/win32nt/CMakeLists.txt
+++ b/modules/rostests/apitests/win32nt/CMakeLists.txt
@@ -64,23 +64,47 @@ list(APPEND SOURCE
#osver.c
win32nt.h)
-add_executable(win32knt_apitest
- ${SOURCE}
- testlist.c
- w32knapi.rc)
+add_library(win32knt_static STATIC ${SOURCE} w32knapi.rc)
+add_dependencies(win32knt_static xdk)
+add_pch(win32knt_static win32nt.h SOURCE)
-target_link_libraries(win32knt_apitest ${PSEH_LIB} gditools)
-set_module_type(win32knt_apitest win32cui)
-add_importlibs(win32knt_apitest
- win32u # win32u_2ksp4 win32u_xpsp2 win32u_2k3sp2 win32u_vista
- gdi32
- user32
- shell32
- advapi32
- msvcrt
- kernel32
- ntdll)
+set(WIN32KNT_IMPORTLIBS gdi32 user32 shell32 advapi32 msvcrt kernel32 ntdll)
-add_dependencies(win32knt_apitest xdk)
-add_pch(win32knt_apitest win32nt.h SOURCE)
-add_rostests_file(TARGET win32knt_apitest)
+if(1) # ros
+ add_executable(win32knt_apitest testlist.c)
+ target_link_libraries(win32knt_apitest ${PSEH_LIB} win32knt_static gditools)
+ set_module_type(win32knt_apitest win32cui)
+ add_importlibs(win32knt_apitest win32u ${WIN32KNT_IMPORTLIBS})
+
+ add_rostests_file(TARGET win32knt_apitest)
+endif()
+
+if(0) # Specify 1 if you want 2ksp4 version
+ # See also ../win32u/CMakeLists.txt
+ add_executable(win32knt_2ksp4_apitest testlist.c)
+ target_link_libraries(win32knt_2ksp4_apitest ${PSEH_LIB} win32knt_static gditools)
+ set_module_type(win32knt_2ksp4_apitest win32cui)
+ add_importlibs(win32knt_2ksp4_apitest win32u_2ksp4 ${WIN32KNT_IMPORTLIBS})
+endif()
+
+if(1) # xpsp2
+ add_executable(win32knt_xpsp2_apitest testlist.c)
+ target_link_libraries(win32knt_xpsp2_apitest ${PSEH_LIB} win32knt_static gditools)
+ set_module_type(win32knt_xpsp2_apitest win32cui)
+ add_importlibs(win32knt_xpsp2_apitest win32u_xpsp2 ${WIN32KNT_IMPORTLIBS})
+endif()
+
+if(1) # 2k3sp2
+ add_executable(win32knt_2k3sp2_apitest testlist.c)
+ target_link_libraries(win32knt_2k3sp2_apitest ${PSEH_LIB} win32knt_static gditools)
+ set_module_type(win32knt_2k3sp2_apitest win32cui)
+ add_importlibs(win32knt_2k3sp2_apitest win32u_2k3sp2 ${WIN32KNT_IMPORTLIBS})
+endif()
+
+if(0) # Specify 1 if you want vista version
+ # See also ../win32u/CMakeLists.txt
+ add_executable(win32knt_vista_apitest testlist.c)
+ target_link_libraries(win32knt_vista_apitest ${PSEH_LIB} win32knt_static gditools)
+ set_module_type(win32knt_vista_apitest win32cui)
+ add_importlibs(win32knt_vista_apitest win32u_vista ${WIN32KNT_IMPORTLIBS})
+endif()