ExternalProject_Add_Step adds the step timestamp file as the
dependency to a '-complete' file generated by add_custom_command
that is run inside the ExternalProject_Add function. Since the
'-complete' file path is computed using CMAKE_CURRENT_BINARY_DIR
we run into the issue if ExternalProject_Add and
ExternalProject_Add_Step are run from the different source
directories and have the different default binary directories as
well. This change suppresses the behavior by adding the
'EXCLUDE_FROM_MAIN TRUE' flag. We may do this since the target
related to the step is added to the dependency chain of executable
target and the chain of external project is not used for now.
Pick-to: 6.3
Change-Id: I7203261b61cfa56bcd9e49ac3e8d7ecb217a5a6c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>