Skip to content
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

CXX-Qt-build: Remove ability to (re-)export definitions #1165

Open
LeonMatthesKDAB opened this issue Jan 23, 2025 · 0 comments · May be fixed by #1167
Open

CXX-Qt-build: Remove ability to (re-)export definitions #1165

LeonMatthesKDAB opened this issue Jan 23, 2025 · 0 comments · May be fixed by #1167
Assignees
Labels
🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo 👷 refactor Something needs to change 🥳🎉 1.0 This issue is part of stabilization for 1.0 release

Comments

@LeonMatthesKDAB
Copy link
Collaborator

We are not able to import definitions into CMake, so relying on definitions as compiler flags is problematic.

Instead, libraries that need certain definitions can generate a header file in their build script that includes the necessary definitions.
See also:
https://www.kdab.com/setting-defines-with-cmake/

@LeonMatthesKDAB LeonMatthesKDAB added 🥳🎉 1.0 This issue is part of stabilization for 1.0 release 👷 refactor Something needs to change 🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo labels Jan 23, 2025
@LeonMatthesKDAB LeonMatthesKDAB moved this from Todo to ToDo - 0.8 in Cxx-Qt 1.0 Jan 23, 2025
@LeonMatthesKDAB LeonMatthesKDAB self-assigned this Jan 23, 2025
LeonMatthesKDAB added a commit to LeonMatthesKDAB/cxx-qt that referenced this issue Jan 23, 2025
These definitions cannot be imported into CMake, as they are unknown at
configure time.
It is also best practice to keep definitions in a header file, as that
allows us to only include them where really needed, as pointed out by
this blog post: https://www.kdab.com/setting-defines-with-cmake/

This is the method that cxx-qt-lib now uses to configure its features.

Closes KDAB#1165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo 👷 refactor Something needs to change 🥳🎉 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