CPack: Do not recurse through directory symlinks

Extend the fix from commit 7b8dcdd1 (CPack: Do not recurse through
directory symlinks (#12284), 2011-08-27, v2.8.6~55^2) to more places in
CPack.

Issue: #12284
24 jobs for cpack-symlinks
Status Name Job ID Coverage
  External
passed cdash

passed cmake-dash3win10-windows-release-ninja

passed cmake-hythloth-linux-debug-makefiles+sphinx

passed cmake-minoc-linux-release-lint-iwyu-tidy

passed cmake-moonshade-osx-debug-ninja

passed cmake-moonshade-osx-release-makefiles

passed cmake-terfin-windows-release-vs2019

passed ghostflow-check-master

passed ghostflow-check-release

passed ghostflow-stager

passed cdash

passed cmake-dash3win10-windows-release-ninja

00:23:01

passed cmake-hythloth-linux-debug-makefiles+sphinx

00:48:20

passed cmake-minoc-linux-release-lint-iwyu-tidy

00:15:16

passed cmake-moonshade-osx-debug-ninja

00:18:52

passed cmake-moonshade-osx-release-makefiles

00:18:59

passed cmake-terfin-windows-release-vs2019

00:50:53

passed ghostflow-check-master

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager