CMake: Rename example targets to make them unique in top-level build


Otherwise, configuration fails with an error like:

CMake Error at qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:750
  (add_executable):
  add_executable cannot create target "trafficlight" because another
  target with the same name already exists.  The existing target is an
  executable created in source directory
  "/home/qt/work/qt/qt5/qttasktree/examples/widgets/trafficlight".
  See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:671
    (_qt_internal_create_executable)
  qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:1015
    (qt6_add_executable)
  qtscxml/examples/statemachine/trafficlight/CMakeLists.txt:17
    (qt_add_executable)

Change-Id: I1148876f90bdf94678adce718fb954d8ab040d69
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
commit83d065c396267589da990865316908520a163914
parent60fa31354d02dc2d253e7bcfa3c7db655ad1f7d4
authorAlexandru Croitor <alexandru.croitor@qt.io>
committerAlexandru Croitor <alexandru.croitor@qt.io>
commit timeThu, 20 Nov 2025 13:19:14 +0100