build: assert wlroots version at comptime

This will prevent people compiling river against the wrong wlroots
version and wondering why it crashes.
This commit is contained in:
Isaac Freund 2021-06-24 19:34:15 +02:00
parent 951c11f642
commit 3392b21aa8
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11
2 changed files with 9 additions and 1 deletions

2
deps/zig-wlroots vendored

@ -1 +1 @@
Subproject commit c5f759484ec2bb6afdee54053f5b0aaccf060131 Subproject commit b270171f7bfe19eb15c1bb2b20121dd9e7ac32f7

View file

@ -16,9 +16,17 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
const std = @import("std"); const std = @import("std");
const assert = std.debug.assert;
const os = std.os; const os = std.os;
const wlr = @import("wlroots"); const wlr = @import("wlroots");
// River requires wlroots 0.14
comptime {
assert(wlr.version.major == 0);
assert(wlr.version.minor == 14);
}
const build_options = @import("build_options"); const build_options = @import("build_options");
const c = @import("c.zig"); const c = @import("c.zig");