mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
fix(build): use correct cmake expression for $<CONFIG>
${CONFIG} is an empty string even when configuration is known at configuration time. $<CONFIG> has to be used at "generation time" Currently zig's reimplementation of cmake config headers does not support $<CONFIG> so use a branch to pick the one which works.
This commit is contained in:
@ -153,11 +153,12 @@ pub fn build(b: *std.Build) !void {
|
||||
config_str = b.fmt("{s} -Dcross -Dtarget={s} (host: {s})", .{ config_str, try t.linuxTriple(b.allocator), try b.graph.host.result.linuxTriple(b.allocator) });
|
||||
}
|
||||
|
||||
const versiondef_step = b.addConfigHeader(.{ .style = .{ .cmake = b.path("src/versiondef.h.in") } }, .{
|
||||
const versiondef_step = b.addConfigHeader(.{ .style = .{ .cmake = b.path("cmake.config/versiondef.h.in") } }, .{
|
||||
.NVIM_VERSION_MAJOR = version.major,
|
||||
.NVIM_VERSION_MINOR = version.minor,
|
||||
.NVIM_VERSION_PATCH = version.patch,
|
||||
.NVIM_VERSION_PRERELEASE = version.prerelease,
|
||||
.NVIM_VERSION_MEDIUM = "",
|
||||
.VERSION_STRING = "TODO", // TODO(bfredl): not sure what to put here. summary already in "config_str"
|
||||
.CONFIG = config_str,
|
||||
});
|
||||
|
Reference in New Issue
Block a user