Skip to content

Commit 2119eb2

Browse files
committed
build: fix cross compilation
1 parent e9a574d commit 2119eb2

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

default.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,13 @@
5454
nativeBuildInputs = [
5555
cmake
5656
ninja
57-
qt6.qtshadertools
5857
spirv-tools
5958
pkg-config
6059
]
61-
++ lib.optional withWayland wayland-scanner;
60+
++ lib.optionals withWayland [
61+
qt6.qtwayland # qtwaylandscanner required at build time
62+
wayland-scanner
63+
];
6264

6365
buildInputs = [
6466
qt6.qtbase

src/wayland/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
find_package(PkgConfig REQUIRED)
22
find_package(WaylandScanner REQUIRED)
3-
pkg_check_modules(wayland REQUIRED IMPORTED_TARGET wayland-client wayland-protocols)
3+
pkg_check_modules(wayland REQUIRED IMPORTED_TARGET wayland-client wayland-protocols>=1.41)
44

55
# wayland protocols
66

@@ -12,13 +12,13 @@ if(NOT TARGET Qt6::qtwaylandscanner)
1212
message(FATAL_ERROR "qtwaylandscanner executable not found. Most likely there is an issue with your Qt installation.")
1313
endif()
1414

15-
execute_process(
16-
COMMAND pkg-config --variable=pkgdatadir wayland-protocols
17-
OUTPUT_VARIABLE WAYLAND_PROTOCOLS
18-
OUTPUT_STRIP_TRAILING_WHITESPACE
19-
)
15+
pkg_get_variable(WAYLAND_PROTOCOLS wayland-protocols pkgdatadir)
2016

21-
message(STATUS "Found wayland-protocols at ${WAYLAND_PROTOCOLS_DIR}")
17+
if(WAYLAND_PROTOCOLS)
18+
message(STATUS "Found wayland protocols at ${WAYLAND_PROTOCOLS}")
19+
else()
20+
message(FATAL_ERROR "Could not find wayland protocols")
21+
endif()
2222

2323
qs_add_pchset(wayland-protocol
2424
DEPENDENCIES Qt::Core Qt::WaylandClient Qt::WaylandClientPrivate

0 commit comments

Comments
 (0)