Repository: bitcoin
Issue: macOS 13.7 depends build can't find qt (symlink)
Labels: macOS,Build system

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current behaviour

```
cd depends
make NO_BDB=1
...
copying packages: boost libevent qt qrencode sqlite miniupnpc zeromq
to: /Volumes/SSD/Dev/bitcoin/depends/x86_64-apple-darwin22.6.0

cd ..
cmake -B build --toolchain depends/x86_64-apple-darwin22.6.0/toolchain.cmake
```

This fails, see below

(building BDB hasn't work for me for a while, but that's going away anyway)

### Expected behaviour

To build

### Steps to reproduce

.

### Relevant log output

```
xcode-select -p                                                             
/Applications/Xcode15.2.app/Contents/Developer
```

```
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SQLite3: /Volumes/SSD/Dev/bitcoin/depends/x86_64-apple-darwin22.6.0/include (found suitable version "3.38.5", minimum required is "3.7.17")
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Found MiniUPnPc: /Volumes/SSD/Dev/bitcoin/depends/x86_64-apple-darwin22.6.0/lib/libminiupnpc.a
-- Checking for module 'libzmq>=4'
--   Found libzmq, version 4.3.5
-- Checking for module 'libqrencode'
--   Found libqrencode, version 4.1.1
-- Could NOT find Qt5Core (missing: Qt5Core_DIR)
-- Could NOT find Qt5Gui (missing: Qt5Gui_DIR)
-- Could NOT find Qt5Widgets (missing: Qt5Widgets_DIR)
-- Could NOT find Qt5LinguistTools (missing: Qt5LinguistTools_DIR)
-- Could NOT find Qt5Network (missing: Qt5Network_DIR)
-- Could NOT find Qt5Test (missing: Qt5Test_DIR)
CMake Error at depends/x86_64-apple-darwin22.6.0/lib/cmake/Qt5/Qt5Config.cmake:51 (_qt5_Core_check_file_exists):
  Unknown CMake command "_qt5_Core_check_file_exists".
Call Stack (most recent call first):
  cmake/module/FindQt.cmake:43 (find_package)
  CMakeLists.txt:180 (find_package)


CMake Warning at cmake/module/FindQt.cmake:43 (find_package):
  Found package configuration file:

    /Volumes/SSD/Dev/bitcoin/depends/x86_64-apple-darwin22.6.0/lib/cmake/Qt5/Qt5Config.cmake

  but it set Qt5_FOUND to FALSE so package "Qt5" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find Qt5 component "Core" config file at
  "/Users/sjors/dev/bitcoin/depends/x86_64-apple-darwin22.6.0/lib/cmake/Qt5Core/Qt5CoreConfig.cmake"


  Failed to find Qt5 component "Gui" config file at
  "/Users/sjors/dev/bitcoin/depends/x86_64-apple-darwin22.6.0/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake"


  Failed to find Qt5 component "Widgets" config file at
  "/Users/sjors/dev/bitcoin/depends/x86_64-apple-darwin22.6.0/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake"


  Failed to find Qt5 component "LinguistTools" config file at
  "/Users/sjors/dev/bitcoin/depends/x86_64-apple-darwin22.6.0/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake"


  Failed to find Qt5 component "Network" config file at
  "/Users/sjors/dev/bitcoin/depends/x86_64-apple-darwin22.6.0/lib/cmake/Qt5Network/Qt5NetworkConfig.cmake"


  Failed to find Qt5 component "Test" config file at
  "/Users/sjors/dev/bitcoin/depends/x86_64-apple-darwin22.6.0/lib/cmake/Qt5Test/Qt5TestConfig.cmake"




Call Stack (most recent call first):
  CMakeLists.txt:180 (find_package)
```


### How did you obtain Bitcoin Core

Compiled from source

### What version of Bitcoin Core are you using?

PR 31048 which builds on master @ 05d25304bc4e0c3058c8ee8a89448ce63ac77304

### Operating system and version

macOS 13.7

### Machine specifications

_No response_