reactos/base/setup/lib/CMakeLists.txt
Hermès Bélusca-Maïto d7c1d220b5
[SETUPLIB][REACTOS][USETUP] Turn setuplib into a DLL shared between TUI and GUI 1st-stage setups (#7523)
CORE-13525

Notes:
- Most of the exported functions have been turned from default cdecl to explicit stdcall / "NTAPI".
- The two InitializeSetup() phases have been collapsed to make the initialization simpler.

Average reductions (percentages; see PR #7523 for actual numbers):

x86 Debug builds:
reactos.exe: 35.1%
smss.exe   : 39.8%
Total (including setuplib.dll): 17.9%

x86 Release builds:
reactos.exe: 22.3%
smss.exe   : 25.0%
Total (including setuplib.dll): 10.6%

x64 Debug builds:
reactos.exe: 40.6%
smss.exe   : 41.6%
Total (including setuplib.dll): 20.0%

x64 Release builds:
reactos.exe: 22.8%
smss.exe   : 22.3%
Total (including setuplib.dll): 10.1%
2024-12-02 23:05:38 +01:00

49 lines
1 KiB
CMake

add_definitions(${I18N_DEFS})
if(_WINKD_)
add_definitions(-D_WINKD_)
endif()
add_definitions(-D_SETUPLIB_)
include_directories(spapisup utils)
spec2def(setuplib.dll setuplib.spec ADD_IMPORTLIB)
list(APPEND SOURCE
spapisup/fileqsup.c
spapisup/infsupp.c
utils/arcname.c
utils/bldrsup.c
utils/devutils.c
utils/filesup.c
utils/fsrec.c
utils/genlist.c
utils/inicache.c
utils/ntverrsrc.c
utils/osdetect.c
utils/partinfo.c
utils/partlist.c
utils/regutil.c
utils/volutil.c
bootcode.c
bootsup.c
fsutil.c
install.c
mui.c
registry.c
settings.c
setuplib.c
precomp.h)
add_library(setuplib SHARED
${SOURCE}
setuplib.rc
${CMAKE_CURRENT_BINARY_DIR}/setuplib.def)
add_pch(setuplib precomp.h SOURCE)
add_dependencies(setuplib xdk) # psdk
set_module_type(setuplib nativedll)
target_link_libraries(setuplib ext2lib vfatlib btrfslib ${PSEH_LIB})
add_importlibs(setuplib ntdll)
add_cd_file(TARGET setuplib DESTINATION reactos/system32 NO_CAB FOR bootcd regtest)