build: add libintl for macOS builds

This commit is contained in:
Mitchell Hashimoto
2025-03-06 07:23:00 -08:00
parent 67488754d5
commit dd95f727ec
4 changed files with 26 additions and 2 deletions

View File

@@ -381,6 +381,17 @@ pub fn add(
if (self.config.renderer == .opengl) {
step.linkFramework("OpenGL");
}
// Apple platforms do not include libc libintl so we bundle it.
// This is LGPL but since our source code is open source we are
// in compliance with the LGPL since end users can modify this
// build script to replace the bundled libintl with their own.
const libintl_dep = b.dependency("libintl", .{
.target = target,
.optimize = optimize,
});
step.linkLibrary(libintl_dep.artifact("intl"));
try static_libs.append(libintl_dep.artifact("intl").getEmittedBin());
}
// cimgui