Is there a way to remove QT dependency if not needed when build?
YukunJ opened this issue · 3 comments
Hello: I am currently use Procgen in my project as a third-party dependency. However, I ran into small problem as it requires the QT module to be pre-installed. But I am not using Procgen in the "interactive" way.
The following is my current bazel-build file.
// part of my workspace file
maybe(
http_archive,
name = "procgen",
sha256 = "8d443b7b8fba44ef051b182e9a87abfa4e05292568e476ca1e5f08f9666a1b72",
strip_prefix = "procgen-0.10.7/procgen/src/",
urls = [
"https://github.com/openai/procgen/archive/refs/tags/0.10.7.zip"
],
build_file = "//third_party/procgen:procgen.BUILD",
)
//third_party/procgen:procgen.BUILD
package(default_visibility = ["//visibility:public"])
cc_library(
name = "procgen",
srcs = glob(["*.cpp", "games/*.cpp"]),
hdrs = glob(["*.h"]),
)
But it won't compile right now as it couldn't find the QT library. I am wondering:
I) is it possible to dynamically link the QT library to the Procgen without pre-install?
II) Is there a version of Procgen that does not rely on QT GUI, purely backend? Or where could I possibly just edit the Procgen file to remove those functionality related to QT GUI (is this possible?)
Thanks!
Solved
How did you resolve this?
actually I didn't quite solve the problem I envisioned, i.e. I didn't remove all the lines and functions about the QT library, although I don't need it.
Instead, I just use (https://github.com/justbuchanan/bazel_rules_qt) with a few patches to make the import header file consistent and move on.