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

qt install path differs by linux distro (and by OS) #4

Open
justbuchanan opened this issue Feb 25, 2020 · 2 comments
Open

qt install path differs by linux distro (and by OS) #4

justbuchanan opened this issue Feb 25, 2020 · 2 comments

Comments

@justbuchanan
Copy link
Owner

In order to use bazel_rules_qt in a bazel project, this must be added to the WORKSPACE fiile:

git_repository(
    name = "com_justbuchanan_rules_qt",
    remote = "https://github.com/justbuchanan/bazel_rules_qt",
    branch = "master",
    path = "QT_PATH",
)

On debian, QT_PATH should be "/usr/include/x86_64-linux-gnu/qt5" and on arch linux, QT_PATH is "/usr/include/qt". It's unfortunate that the WORKSPACE file must be modified depending on which system you're trying to build your app on. It would be nice to have bazel auto-detect this somehow.

@limdor
Copy link
Contributor

limdor commented Jan 24, 2021

@justbuchanan In case you are interested, I started working on a way to autodetect the system limdor#6, next step will be to read it from an environment variable limdor#13

@justbuchanan
Copy link
Owner Author

That looks great! I have a project that I develop on a debian computer and an acrh linux computer, so being able to set QT_DIR and have it just work would be awesome (previously I was editing WORKSPACE). Especially nice that the repository_ctx approach easily adapts to use on windows.

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

No branches or pull requests

2 participants