ExternalProject that depends on another target for SOURCE_DIR

I’m trying to define an external project that depends on another target to prepare its source directory:

ExternalProject_Add(Dependency ...)
ExternalProject_Get_Property(Dependency INSTALL_DIR)
set(target_source_dir "${INSTALL_DIR}")

ExternalProject_Add(Target
    DEPENDS Dependency
    SOURCE_DIR "${target_source_dir}"
    BUILD_IN_SOURCE TRUE
    ...
)

However, CMake fails with the following error:

  No download info given for '...' and its source directory:
   /some/directory
  is not an existing non-empty directory.  Please specify one of:

where /some/directory exists but is empty at the time of configuration.

Should I put an empty file in /some/directory to satisfy the check?

I think you need do add a dependency from the download step as that is typically assumed to have no dependencies.

Cc: @craig.scott