2011-05-16 13:12:07 +00:00
|
|
|
|
2015-06-20 13:03:46 +00:00
|
|
|
file(GLOB welcome_rc_deps res/*.*)
|
|
|
|
add_rc_deps(welcome.rc ${welcome_rc_deps})
|
2011-05-16 13:12:07 +00:00
|
|
|
add_executable(welcome welcome.c welcome.rc)
|
2011-09-03 19:11:44 +00:00
|
|
|
set_module_type(welcome win32gui UNICODE)
|
2015-03-04 22:37:51 +00:00
|
|
|
add_importlibs(welcome gdi32 user32 shell32 msvcrt kernel32 ntdll)
|
2018-05-20 19:59:40 +00:00
|
|
|
|
|
|
|
# Reduce the required subsystem to WinNT 4.0 for i386 builds only.
|
|
|
|
if(ARCH STREQUAL "i386")
|
|
|
|
if(MSVC)
|
|
|
|
# NOTE: We cannot use the following command:
|
2021-09-13 16:51:08 +00:00
|
|
|
# target_link_options(welcome PRIVATE "/SUBSYSTEM:WINDOWS,4.00")
|
2018-05-20 19:59:40 +00:00
|
|
|
# because it would act at the level of the LINK.EXE linker flags,
|
|
|
|
# which only accepts a subsystem version >= 5.10 (Windows XP+) on
|
|
|
|
# latest MSVC versions.
|
|
|
|
# So to work around this problem, we use a post-build command by
|
|
|
|
# employing EDITBIN.EXE that does not check the subsystem version.
|
|
|
|
#
|
|
|
|
add_custom_command(
|
|
|
|
TARGET welcome POST_BUILD
|
2024-07-04 15:13:02 +00:00
|
|
|
COMMAND editbin.exe /NOLOGO /SUBSYSTEM:WINDOWS,4.00 $<TARGET_FILE:welcome> > NUL
|
2018-05-20 19:59:40 +00:00
|
|
|
VERBATIM)
|
|
|
|
else()
|
|
|
|
# The binutils linker does not set a lower limit on the subsystem.
|
|
|
|
# Otherwise we would use: objcopy --subsystem windows:4.00 $<TARGET_FILE:welcome>
|
2021-09-13 16:51:08 +00:00
|
|
|
target_link_options(welcome PRIVATE "-Wl,--subsystem,windows:4.00")
|
2018-05-20 19:59:40 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2011-05-16 13:12:07 +00:00
|
|
|
add_cd_file(TARGET welcome DESTINATION reactos NO_CAB FOR bootcd)
|