CMake: Fix examples built outside of Qt build


Configuring the simpleswitch and ssl examples didn't work in Qt Creator
since the qt_internal_add_example function is not available for user
projects.

Pick-to: 6.8 6.9
Task-number: QTBUG-132738
Change-Id: I4a90984300d4c9b3036816d4f375653280a57de2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
commit6a7df135f60d41763c37ef885a793714300b2851
parent397c6cc84adb060a635d94ab270b5c4138c4e077
authorJoerg Bornemann <joerg.bornemann@qt.io>
committerJoerg Bornemann <joerg.bornemann@qt.io>
commit timeSun, 26 Jan 2025 21:07:29 +0100