Skip to content
New issue

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

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

Already on GitHub? # to your account

QmlModule in cxx-qt-build should use their own isolated cc::Build #1065

Open
ahayzen-kdab opened this issue Sep 10, 2024 · 0 comments · May be fixed by #1066
Open

QmlModule in cxx-qt-build should use their own isolated cc::Build #1065

ahayzen-kdab opened this issue Sep 10, 2024 · 0 comments · May be fixed by #1066
Labels
🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo 🤔 discussion Feedback welcome 🥳🎉 1.0 This issue is part of stabilization for 1.0 release

Comments

@ahayzen-kdab
Copy link
Collaborator

As we move to building QmlModule with their include paths being added #856 we need to avoid different QmlModule causing collisions between each other.

At the moment we have one large cc::Build that is used for the main CxxQtBuilder and any QmlModules, any files or include paths that are added to the cc::Build are then common everywhere as the same cc::Build is shared.

Instead we need to adjust our API so that QmlModules can also specify things like C++ source files to compile, C++ header files to give to moc, cc_builder closures etc.

Consider if we need a whole refactor of the public build API so that QmlModules become a sub / nested build.

Eg

CxxQtBuilder::qml_module("com.kdab.uri")
   .file(...)
   .qml(...)
   .qrc(...)
   .qobject_header(...)
   .cc_builder(|cc| ... )
   .build();

CxxQtBuilder::library()
   .file(...)
   .qml(...)
   .qrc(...)
   .qobject_header(...)
   .cc_builder(|cc| ... )
   .build();

CxxQtBuilder::executable()
   .file(...)
   .qml(...)
   .qrc(...)
   .qobject_header(...)
   .cc_builder(|cc| ... )
   .build();

This could then mean that one crate could potentially be one Qml Module or a library or an executable etc.

@ahayzen-kdab ahayzen-kdab added 🤔 discussion Feedback welcome 🥳🎉 1.0 This issue is part of stabilization for 1.0 release 🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo labels Sep 10, 2024
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Sep 10, 2024
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Sep 10, 2024
@LeonMatthesKDAB LeonMatthesKDAB moved this from Todo to ToDo - 0.8 in Cxx-Qt 1.0 Oct 1, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo 🤔 discussion Feedback welcome 🥳🎉 1.0 This issue is part of stabilization for 1.0 release
Projects
Status: ToDo - 0.8
Development

Successfully merging a pull request may close this issue.

1 participant