I don't do much development on macOS, but AIUI the reason the deploy tool is run on the files in the build dir is that you're not expected to install them. (Not using CMake, anyway.)
If you look at the docs on macOS deployment using CMake, they say:
To build for Apple platforms you need to set cmake_minimum_required() to 3.21.1 or newer:
cmake_minimum_required(VERSION 3.21.1)
Go into the directory that contains the application:
cd /path/to/Qt/examples/widgets/tools/plugandpaint/app
Next, set the CMAKE_PREFIX_PATH variable to point to your installation prefix. If you have a Cmake build already, delete the CMakeCache.txt file. Then, rerun CMake:
cmake -DCMAKE_PREFIX_PATH=path/to/Qt/6.9.1/your_platform
-S <source-dir> -B <build-dir> -G Ninja
Alternatively, use the convenience script qt-cmake, which sets the CMAKE_PREFIX_PATH variable for you.
path/to/Qt/6.9.1/your_platform/bin/qt-cmake
-S <source-dir> -B <build-dir> -G Ninja
Finally, go into your build directory and run your preferred build system. In this example, we're using Ninja.
cd path/to/build/dir
ninja
Now, provided that everything compiled and linked without any errors, you should have a plugandpaint.app bundle ready for deployment. Try installing the bundle on a machine running macOS that does not have Qt or any Qt applications installed.
So, the application bundle in the build directory is the one processed by macdeployqt (which you can see is the case in your own CMake output as well), on the assumption that after it's been made self-contained and code-signed, it's ready for deployment using standard macOS means (.dmg files and drag-and-drop installation).
Update
I've decided I'm wrong about some of this, because the deployment tools only run on install(). Qt's CMake deployment docs mention, for Qt Quick applications:
You install the application as before.
install(TARGETS MyApp
BUNDLE DESTINATION .
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
To generate the deployment script, you call qt_generate_deploy_qml_app_script() instead of qt_generate_deploy_app_script().
qt_generate_deploy_qml_app_script(
TARGET MyApp
OUTPUT_SCRIPT deploy_script
)
install(SCRIPT ${deploy_script})
On installation, the application binary will be deployed, including the QML files and the shared libraries and assets of Qt that are used by the project. Again, the resulting directory is self-contained and can be packaged by tools like cpack.
It might be worth looking at the generated cmake_install.cmake in the bundle's build directory, to see what it's doing? That file will be created immediately after configuration, you don't even need to run the build to examine it.