Files
reactos/boot
Hermès Bélusca-Maïto deeae5db00 [0.4.16][BOOTDATA][CMAKE] Improve the add_livecd_shortcut/add_link helpers (#8936)
CMakeLists.txt: `add_livecd_shortcut()`:

Turn the macro into a function. Instead of keeping a `LIVECD_SHORTCUTS`
global-scope list variable, just define a `livecd_links` custom target
as initially empty, then, using `set_property()`, directly append to it
its "SOURCES" i.e. generated .lnk files.
(This is equivalent to using `target_sources(livecd_links PRIVATE ...)`
only in CMake 3.20+ for the custom target.)

CMakeMacros.cmake: `add_link()`:

- Since both `name` and `path` parameters are mandatory, make them
  explicit in the function declaration instead of defining them as
  "optional" parameters.

- Remove the `set_source_files_properties(... PROPERTIES GENERATED TRUE)`
  invocation that followed the `add_custom_command(...)` call, since,
  per the documentation[^1],
  "Each output file will be marked with the `GENERATED` source file
  property automatically." (Since CMake 3.2 at least.)

[^1]: https://cmake.org/cmake/help/v3.17/command/add_custom_command.html

This is a cherry-pick of 3a3b16af0d.
2026-05-21 19:51:34 -05:00
..