Skip to content

Commit b2535fc

Browse files
tkreuzerDarkFire01
authored andcommitted
[WIN32_REGISTRY] Add win32_registry static library
To be used by NT6 apis in kernel32 This is not great. It works, but it puts stuff into the lib that shouldn't be in there. We need it, because the includes need the generated files. Maybe a dependency could solve that.
1 parent 037e604 commit b2535fc

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

dll/win32/advapi32/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ list(APPEND SOURCE
2525
misc/shutdown.c
2626
misc/sysfunc.c
2727
misc/unicode.c
28-
reg/hkcr.c
29-
reg/reg.c
3028
sec/ac.c
3129
sec/audit.c
3230
sec/lsa.c
@@ -54,14 +52,23 @@ list(APPEND PCH_SKIP_SOURCE
5452
${CMAKE_CURRENT_BINARY_DIR}/svcctl_c.c
5553
${CMAKE_CURRENT_BINARY_DIR}/winreg_c.c)
5654

55+
# This static library is for kernelbase and vista APIs in kernel32
56+
add_library(win32_registry
57+
${PCH_SKIP_SOURCE}
58+
reg/hkcr.c
59+
reg/reg.c
60+
)
61+
target_link_libraries(win32_registry ${PSEH_LIB})
62+
target_compile_definitions(win32_registry PRIVATE _KERNEL32_ UNICODE _UNICODE)
63+
5764
add_library(advapi32 MODULE
5865
${SOURCE}
5966
${PCH_SKIP_SOURCE}
6067
advapi32.rc
6168
${CMAKE_CURRENT_BINARY_DIR}/advapi32.def)
6269

6370
set_module_type(advapi32 win32dll UNICODE ENTRYPOINT DllMain 12)
64-
target_link_libraries(advapi32 cryptlib wine ${PSEH_LIB})
71+
target_link_libraries(advapi32 win32_registry cryptlib wine ${PSEH_LIB})
6572
if(DLL_EXPORT_VERSION GREATER_EQUAL 0x600)
6673
target_link_libraries(advapi32 etwtrace)
6774
endif()

0 commit comments

Comments
 (0)