CMake: Re-organize build and package dependencies


Rename the qtopenapicommon directory to openapicommon, we don't
usually use a qt prefix in the dir name.

Move the building of the OpenApiCommon library to happen in its own
subdirectory under src, rather than tools, it's a qt module after all.

Add the OpenApiCommon library as a dependency of the OpenApi module at
the CMake package level, so that find_package(Qt6 COMPONENTS OpenApi)
will also find the OpenApiCommon library.

Make sure to add_subdirectory(openapicommon) before
add_subdirectory(openapi), otherwise the package-level dependency
won't work.

Change-Id: Iefd3fbc8d7e3f292b611295926ab03a2d2b06542
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
commit42770a7e501c07bba78e6fb1ac466f4d6c29a9e1
parent0cf00f0122c7d87c2ef423c47bd6e3370cafff2b
authorAlexandru Croitor <alexandru.croitor@qt.io>
committerAlexandru Croitor <alexandru.croitor@qt.io>
commit timeWed, 26 Nov 2025 15:42:45 +0100