CMake: simplify conditions


`if` tends to interpret NOTFOUND suffix as false. our code did this
check explicitly, however it seems this either recently broke, or the
quotes caused issues, as my local build failed with:

```
CMake Error in qtvirtualkeyboard/src/virtualkeyboard/CMakeLists.txt:
  IMPORTED_LOCATION or IMPORTED_IMPLIB not set for imported target
  "MyScript::VOIM" configuration "Debug".

CMake Error in qtvirtualkeyboard/src/virtualkeyboard/CMakeLists.txt:
  IMPORTED_LOCATION or IMPORTED_IMPLIB not set for imported target
  "MyScript::VOIM" configuration "Debug".
```

relying on cmake's `if` makes this issue disappear.

Pick-to: 6.11 6.10 6.8 6.5
Change-Id: I56c891db7578274d678d11abd9c9b226e6c1d60b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
commitd750bb71a0c458c4331b3a81261697fd7b530d20
parent0e8c83122fc6fdcad3bec6de94fba48718c832c6
authorTim Blechmann <tim.blechmann@qt.io>
committerTim Blechmann <tim.blechmann@qt.io>
commit timeMon, 15 Dec 2025 15:38:30 +0800