reactos/base/setup/usetup/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

40 lines
1,014 B
CMake

add_definitions(${I18N_DEFS})
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../lib
# ${REACTOS_SOURCE_DIR}/base/setup/lib
${REACTOS_SOURCE_DIR}/sdk/lib/inflib
${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib
${REACTOS_SOURCE_DIR}/sdk/include/reactos/drivers)
list(APPEND SOURCE
spapisup/cabinet.c
spapisup/fileqsup.c
spapisup/infsupp.c
cmdcons.c
console.c
consup.c
devinst.c
fmtchk.c
fslist.c
genlist.c
keytrans.c
mui.c
partlist.c
progress.c
usetup.c
usetup.h)
add_executable(usetup ${SOURCE} usetup.rc)
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(usetup PRIVATE "-Wno-invalid-source-encoding")
endif()
add_pch(usetup usetup.h SOURCE)
set_module_type(usetup nativecui)
target_link_libraries(usetup inflib zlib_solo chkstk)
add_importlibs(usetup setuplib ntdll)
add_cd_file(TARGET usetup DESTINATION reactos/system32 NO_CAB NAME_ON_CD smss.exe FOR bootcd regtest)