Configuring the running environment for an extension build-tree

Hello. Is there any reason for the following code not taking effect when added to a External_something.cmake file in a superbuild extension?

  set(${proj}_ENVVARS_LAUNCHER_BUILD
    "VAR1=${VAR1}"
    "VAR2=anything"
    )
  mark_as_superbuild(
    VARS ${proj}_ENVVARS_LAUNCHER_BUILD
    LABELS "ENVVARS_LAUNCHER_BUILD"
    )

This, in turn, works fine:

  # python paths
  set(${proj}_PYTHONPATH_LAUNCHER_BUILD
    ${EP_BINARY_DIR}/lib/python3/site-packages
    )
  mark_as_superbuild(
    VARS ${proj}_PYTHONPATH_LAUNCHER_BUILD
    LABELS "PYTHONPATH_LAUNCHER_BUILD"
    )

And I can see that the AdditionalLauncherSettings.ini file includes the expected path in the PYTHONPATH variable.

Any pointers? Thank you in advance.

I’ve done some investigation and it seems to be a bug in the Slicer CMake infrastructure for generating the AdditionalLauncherSettings.ini file. I’ll come up with PR to solve this