qt install path differs by linux distro (and by OS)
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.
@justbuchanan In case you are interested, I started working on a way to autodetect the system https://github.com/limdor/bazel_rules_qt/pull/6, next step will be to read it from an environment variable https://github.com/limdor/bazel_rules_qt/issues/13
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.