[CMAKE] Replace custom scripts in compilerflags with standard ones

- add_target_link_flags changed to target_link_options
- add_target_property changed to set_property(... APPEND ...)
This commit is contained in:
Victor Perevertkin 2021-09-13 19:51:08 +03:00
parent 233c74e25a
commit 8e1fa03456
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
12 changed files with 34 additions and 79 deletions

View file

@ -9,7 +9,7 @@ add_importlibs(welcome gdi32 user32 shell32 msvcrt kernel32 ntdll)
if(ARCH STREQUAL "i386")
if(MSVC)
# NOTE: We cannot use the following command:
# add_target_link_flags(welcome "/SUBSYSTEM:WINDOWS,4.00")
# target_link_options(welcome PRIVATE "/SUBSYSTEM:WINDOWS,4.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.
@ -23,7 +23,7 @@ if(ARCH STREQUAL "i386")
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>
add_target_link_flags(welcome "-Wl,--subsystem,windows:4.00")
target_link_options(welcome PRIVATE "-Wl,--subsystem,windows:4.00")
endif()
endif()