From 949cc6d9ff6382e3e315d66a1de988ebbc60dcd1 Mon Sep 17 00:00:00 2001 From: Antoine Date: Tue, 17 Sep 2024 09:32:30 +0200 Subject: [PATCH] Fix exported headers paths --- build.zig | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/build.zig b/build.zig index e11cbf9..1e768bd 100644 --- a/build.zig +++ b/build.zig @@ -203,34 +203,20 @@ pub fn build(b: *std.Build) !void { ); libpq.installHeadersDirectory( upstream.path(libpq_path), - "internal", + "postgresql/internal", .{ .include_extensions = &.{ "libpq-int.h", "fe-auth-sasl.h", "pqexpbuffer.h", } }, ); - libpq.installHeadersDirectory( - upstream.path("src/include/libpq"), - "libpq", - .{ .include_extensions = &.{ - "libpq-fs.h", - "pqcomm.h", - } }, - ); - common.installHeadersDirectory( - upstream.path("src/include"), - "", - .{ - .include_extensions = &.{ - "postgres_ext.h", - "pg_config_manual.h", - "postgres_fe.h", - }, - }, - ); - libport.installHeader(upstream.path("src/include/c.h"), "c.h"); - libport.installHeader(upstream.path("src/include/port.h"), "port.h"); + libpq.installHeader(upstream.path("src/include/libpq/libpq-fs.h"), "libpq/libpq-fs.h"); + libpq.installHeader(upstream.path("src/include/libpq/pqcomm.h"), "postgresql/internal/libpq/pqcomm.h"); + common.installHeader(upstream.path("src/include/pg_config_manual.h"), "pg_config_manual.h"); + common.installHeader(upstream.path("src/include/postgres_ext.h"), "postgres_ext.h"); + common.installHeader(upstream.path("src/include/postgres_fe.h"), "postgresql/internal/postgres_fe.h"); + libport.installHeader(upstream.path("src/include/c.h"), "postgresql/internal/c.h"); + libport.installHeader(upstream.path("src/include/port.h"), "postgresql/internal/port.h"); // Build executables to ensure no symbols are left undefined const test_step = b.step("examples", "Build example programs");