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
2 changed files with 9 additions and 1 deletions

View File

@ -16,9 +16,17 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
const std = @import("std");
const assert = std.debug.assert;
const os = std.os;
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 c = @import("c.zig");