Skip to content

Commit

Permalink
tooling: include qt5 via copts
Browse files Browse the repository at this point in the history
  • Loading branch information
danctorres committed Dec 14, 2024
1 parent 43f7303 commit dfca3fb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RUN apt-get update && apt-get install -y \
libxcb-xkb1 \
libxcb-cursor0 \
locales \
qtbase5-dev \
&& apt-get clean

RUN wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
Expand Down
27 changes: 19 additions & 8 deletions examples/qt/BUILD
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
load("@rules_qt//:qt.bzl", "qt_cc_binary", "qt_cc_library")

qt_cc_library(
cc_library(
name = "lib",
srcs = ["hello.cpp"],
hdrs = ["hello.hpp"],
deps = [
"@rules_qt//:qt_core",
"@rules_qt//:qt_widgets",
hdrs = [
"hello.hpp",
],
copts = [
"-I/usr/include/x86_64-linux-gnu/qt5",
"-I/usr/include/x86_64-linux-gnu/qt5/QtWidgets",
"-I/usr/include/x86_64-linux-gnu/qt5/QtCore",
],
linkopts = [
"-lQt5Widgets",
"-lQt5Core",
"-lQt5Gui",
],
)

qt_cc_binary(
cc_binary(
name = "bin",
srcs = ["main.cpp"],
copts = [
"-I/usr/include/x86_64-linux-gnu/qt5",
"-I/usr/include/x86_64-linux-gnu/qt5/QtWidgets",
"-I/usr/include/x86_64-linux-gnu/qt5/QtCore",
],
deps = [
":lib",
],
Expand Down

0 comments on commit dfca3fb

Please sign in to comment.