Skip to content

cxx-qt-build: return an Interface from CxxQtBuilder #1287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

LeonMatthesKDAB
Copy link
Collaborator

Another take on #1285.

The main difference is in how include paths are handled for the CXX-style automatic include of the header directory.

In this PR, the root of the automatic inclue can be configured.
This leads to less changes for downstream crates.
It also allows us to move to an include system of "cxx-qt-lib/core/qstring.h" while keeping backwards-compatibility with forwarding-headers

  • cxx-qt-build: split interface into a separate file
  • cxx-qt-build: move write_manifest to export of Interface
  • cxx-qt-build: move write of exported include directories to interface
  • cxx-qt-build: store manifest and dependencies in Interface for now
  • cxx-qt-build: return an Interface rather than taking as input
  • cxx-qt-build: check the links key when exporting
  • cxx-qt-build: remove CxxQtBuilder::library instead use new and export
  • cxx-qt-build: Add CXX-style automatic inclusion of header files
  • cxx-qt-build: Remove Interface::export_include_dir

ahayzen-kdab and others added 9 commits May 22, 2025 17:16
This still needs more refactoring later but is a first step.
This allows export() to have no args meaning we can return an Interface
from the compile command next.
We however have two changes compared to CXX:
1. We allow you to change the root of the automatic include directory.
2. We allow you to include additional directories.

Both of these changes are there to accomodate crates like cxx-qt-lib,
that want to use e.g. `<cxx-qt-lib/qstring.h>` instead of
`<cxx-qt-lib/include/qstring.h>`.
Also cxx-qt-lib generates a definitions header which we need to include.
This is no longer needed.

Also clean up some documentation on the API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants