[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.
This commit is contained in:
Timo Kreuzer
2026-06-24 15:27:43 -07:00
committed by Justin Miller
parent 4369126acc
commit a723ff5600
+10 -3
View File
@@ -25,8 +25,6 @@ list(APPEND SOURCE
misc/shutdown.c
misc/sysfunc.c
misc/unicode.c
reg/hkcr.c
reg/reg.c
sec/ac.c
sec/audit.c
sec/lsa.c
@@ -54,6 +52,15 @@ list(APPEND PCH_SKIP_SOURCE
${CMAKE_CURRENT_BINARY_DIR}/svcctl_c.c
${CMAKE_CURRENT_BINARY_DIR}/winreg_c.c)
# This static library is for kernelbase and vista APIs in kernel32
add_library(win32_registry
${PCH_SKIP_SOURCE}
reg/hkcr.c
reg/reg.c
)
target_link_libraries(win32_registry ${PSEH_LIB})
target_compile_definitions(win32_registry PRIVATE _KERNEL32_ UNICODE _UNICODE)
add_library(advapi32 MODULE
${SOURCE}
${PCH_SKIP_SOURCE}
@@ -61,7 +68,7 @@ add_library(advapi32 MODULE
${CMAKE_CURRENT_BINARY_DIR}/advapi32.def)
set_module_type(advapi32 win32dll UNICODE ENTRYPOINT DllMain 12)
target_link_libraries(advapi32 cryptlib wine ${PSEH_LIB})
target_link_libraries(advapi32 win32_registry cryptlib wine ${PSEH_LIB})
if(DLL_EXPORT_VERSION GREATER_EQUAL 0x600)
target_link_libraries(advapi32 etwtrace)
endif()