| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@jamesobutler Now this has been proposed upstream, we will be able to contribute CMakeLists.txt changes including Qt6 support, along with finalizing CTK & Slicer Qt updates 🚀 |
Sorry, something went wrong.
|
@mrbean-bremen Thanks for the review 🙏 I will revisit and update shortly 🚀 |
Sorry, something went wrong.
…a4f49b (bfc53ad); was master (37fa4f4) Upstream: commontk/simplecpp@bfc53ad Source date: 2025-08-30 Files: generator/simplecpp/simplecpp.h, generator/simplecpp/simplecpp.cpp Patch: generator/simplecpp/do_not_stop_on_error.patch re-applied Compare: commontk/simplecpp@37fa4f4...bfc53ad
- Prefer `QLibraryInfo::{HeadersPath}` to locate Qt headers; fall back to
`$QTDIR/include` when `QLibraryInfo` is unavailable or invalid.
- Accept include roots from `PYTHONQT_INCLUDE` and `--include-paths`; warn
and skip non-existent paths; normalize with `QDir::cleanPath`.
- Probe module subdirs under the Qt include root and append those that
exist (QtCore, QtGui, QtNetwork, QtOpenGL, QtXml).
- Use `DUI::addIncludePath(...)` instead of pushing to `includePaths`.
- Minor cleanups: Use QStringLiteral, add helpers for path joining/dir checks.
Remove hardcoded macOS `/Library/Frameworks` header paths from the QTDIR-missing
branch anticipating the addition of `getFrameworkDirectories` function.
… PYTHONQT_FRAMEWORK
Add `getFrameworkDirectories` to collect framework/library search roots from:
- `.` (cwd),
- `PYTHONQT_FRAMEWORK` (path-list, validated),
- `--framework-paths` CLI arg (validated),
- `${QTDIR}/lib/<Module>` when present, plus `${QTDIR}/lib`.
Co-authored-by: Hans Johnson <hans-johnson@uiowa.edu>
- Extend Qt version discovery to accept framework roots (e.g., .../QtCore.framework) in addition to include dirs. - On macOS, also probe `Versions/A/Headers/qtcoreversion.h`. - Try include paths first, then framework paths; abort with a clear error if neither yields a version. Co-authored-by: Hans Johnson <hans-johnson@uiowa.edu>
…generated on macOS
This improves header file detection on macOS by introducing support for additional common paths where `qtcoreversion.h` might be located. This change enhances compatibility with different Qt installations.
|
@mrbean-bremen This now ready for final review & integration 🙏 🚀 |
Sorry, something went wrong.
There was a problem hiding this comment.
Very nice - thank you!
Sorry, something went wrong.
| // Prefer QLibraryInfo (works without QTDIR) | ||
| QString qtInclude = QLibraryInfo::location(QLibraryInfo::HeadersPath); | ||
| if (!isDir(qtInclude)) { | ||
| // Fallback to QTDIR/include | ||
| const QString qtDir = qEnvironmentVariable("QTDIR"); |
There was a problem hiding this comment.
I dislike a little bit the fact that now we can't generate the bindings for a different Qt version than the version with which the generator was built. Sure, this is a little bit of a corner case, but I know that I have used this at some time during development.
Could we get another override mechanism for the Qt include directory?
Sorry, something went wrong.
There was a problem hiding this comment.
Very sensible point. This is an oversight & I will revisit.
Sorry, something went wrong.
There was a problem hiding this comment.
I dislike a little bit the fact that now we can't generate the bindings for a different Qt version than the version with which the generator was built. Sure, this is a little bit of a corner case, but I know that I have used this at some time during development.
For future reference, this has been addressed in #313
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR modernizes how the generator discovers Qt headers/frameworks and vendors a newer simplecpp with framework-aware search logic. Together these changes make builds robust on macOS (Qt frameworks) and cleaner across all platforms.
Vendor simplecpp update
Bumps generator/simplecpp/{simplecpp.h, simplecpp.cpp} to patched-2025-08-30-37fa4f49b (upstream: commontk/simplecpp@bfc53ad; previously cppcheck-opensource/simplecpp@37fa4f4).
Re-applies local patch: generator/simplecpp/do_not_stop_on_error.patch.
Introduces a typed, ordered search path API:
Adds Apple framework resolution for #include <Pkg/Hdr.h> → <Pkg.framework/Headers/Hdr.h> (and PrivateHeaders fallback).
Interleaves -I and -F in the original CLI order; handles -isystem and -iframework.
Upstream compare: commontk/simplecpp@37fa4f4...bfc53ad
Note
This changes are vendored from the commontk/simplecpp fork including commit backported from:
Generator: discover Qt headers via QLibraryInfo
Prefers QLibraryInfo::HeadersPath; falls back to $QTDIR/include if needed.
Accepts include roots from:
Probes and appends existing module subdirs under the Qt include root: QtCore, QtGui, QtNetwork, QtOpenGL, QtXml.
Starts using DUI::addIncludePath(...) instead of pushing to the legacy includePaths.
Removes hardcoded macOS /Library/Frameworks/.../Headers assumptions (to defer to new framework discovery).
Generator: discover Qt framework paths dynamically (macOS)
New getFrameworkDirectories(...) collects framework/library search roots from:
Passes these paths to the preprocessor using DUI::addFrameworkPath(...).
Generator: detect Qt version from frameworks on macOS
This pull request supersedes the following ones:
This pull request fixes the following issues: