From f9effd17bcd87e2cd7bf1ba20951abd4b1de679e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 14 May 2026 21:57:44 +0200 Subject: [PATCH] [BOOTDATA] Simplify add_livecd_shortcut() parameters handling Only handle `DESTINATION`, and transfer all the other parameters verbatim to `add_link()`. Addendum to commits 3a3b16af0d, 8cb3980766, and a46e1e96ec (PR #8936). --- boot/bootdata/CMakeLists.txt | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/boot/bootdata/CMakeLists.txt b/boot/bootdata/CMakeLists.txt index e0c3545df44..def86bf9c90 100644 --- a/boot/bootdata/CMakeLists.txt +++ b/boot/bootdata/CMakeLists.txt @@ -60,25 +60,13 @@ add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/livecd/unattend.inf DESTINATION rea # LiveImage shortcuts add_custom_target(livecd_links) function(add_livecd_shortcut name path) - cmake_parse_arguments(_shortcut "" "WORKDIR;CMDLINE_ARGS;ICON;ICON_INDEX" "DESTINATION" ${ARGN}) + # Only handle DESTINATION; transfer all the other parameters verbatim to add_link() + cmake_parse_arguments(_shortcut "" "" "DESTINATION" ${ARGN}) if(NOT _shortcut_DESTINATION) message(FATAL_ERROR "You must provide at least one destination") endif() - if(DEFINED _shortcut_WORKDIR) - set(_shortcut_WORKDIR WORKDIR "${_shortcut_WORKDIR}") - endif() - if(DEFINED _shortcut_CMDLINE_ARGS) - set(_shortcut_CMDLINE_ARGS CMDLINE_ARGS "${_shortcut_CMDLINE_ARGS}") - endif() - if(DEFINED _shortcut_ICON) - set(_shortcut_ICON ICON "${_shortcut_ICON}") - endif() - if(DEFINED _shortcut_ICON_INDEX) - set(_shortcut_ICON_INDEX ICON_INDEX ${_shortcut_ICON_INDEX}) - endif() - - add_link(${name} ${path} ${_shortcut_WORKDIR} ${_shortcut_CMDLINE_ARGS} ${_shortcut_ICON} ${_shortcut_ICON_INDEX}) + add_link(${name} ${path} ${_shortcut_UNPARSED_ARGUMENTS}) # Only on CMake 3.20+: target_sources(livecd_links PRIVATE ...) set_property(TARGET livecd_links APPEND PROPERTY SOURCES "${CMAKE_CURRENT_BINARY_DIR}/${name}.lnk")