CMake: Add options to retrieve dir of generated OpenApi headers
Add the OUTPUT_PUBLIC_HEADERS_DIR and OUTPUT_PRIVATE_HEADERS_DIR options
to the qt_add_openapi_client() function.
These options can be specified by a user project to get the
directories where headers generated by the openapi generator will be
placed. The project can then write install rules that install all
header files from these directories, to ship the headers alongside
their client library.
Because the client headers are not known until build time, the best
we can do at configure time is tell the project in which directory the
headers will exist.
Add an end-to-end RunCMake test.
It tests building and installing a client and its headers.
And then in a separate project it links to the installed client
library to build the final executable that uses the client, and runs
the executable.
The test uses a copy of the compression test spec file and sources.
Change-Id: Ifd57ee61689e7ccc02197b928c2a2cb080e64ce5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>