mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
Add the ATLMFC include directory to the libc include dir list
https://learn.microsoft.com/en-us/cpp/mfc/mfc-and-atl Note that this include directory gets added to %INCLUDE% by vcvarsall.bat, and is especially crucial when working with resource files (many .rc files within the https://github.com/microsoft/Windows-classic-samples/ set reference files from the ATLMFC include directory).
This commit is contained in:
parent
2a56fe1175
commit
28f6559947
@ -5636,6 +5636,13 @@ fn detectLibCFromLibCInstallation(arena: Allocator, target: Target, lci: *const
|
||||
if (!is_redundant) list.appendAssumeCapacity(lci.sys_include_dir.?);
|
||||
|
||||
if (target.os.tag == .windows) {
|
||||
if (std.fs.path.dirname(lci.sys_include_dir.?)) |sys_include_dir_parent| {
|
||||
// This include path will only exist when the optional "Desktop development with C++"
|
||||
// is installed. It contains headers, .rc files, and resources. It is especially
|
||||
// necessary when working with Windows resources.
|
||||
const atlmfc_dir = try std.fs.path.join(arena, &[_][]const u8{ sys_include_dir_parent, "atlmfc", "include" });
|
||||
list.appendAssumeCapacity(atlmfc_dir);
|
||||
}
|
||||
if (std.fs.path.dirname(lci.include_dir.?)) |include_dir_parent| {
|
||||
const um_dir = try std.fs.path.join(arena, &[_][]const u8{ include_dir_parent, "um" });
|
||||
list.appendAssumeCapacity(um_dir);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user