File tree 1 file changed +23
-1
lines changed
scripts/build/pg_config_vcpkg_stub/pg_config_vcpkg_stub 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,18 @@ def _main() -> None:
39
39
raise ScriptError (f"libpq library not found: { f } " )
40
40
print (vcpkg_platform_root .joinpath ("lib" ))
41
41
42
- elif args .includedir :
42
+ elif args .includedir or args .includedir_server :
43
+ # NOTE: on linux, the includedir-server dir contains pg_config.h
44
+ # which we need because it includes the PG_VERSION_NUM macro.
45
+ # In the vcpkg directory this file is in the includedir directory,
46
+ # therefore we return the same value.
43
47
if not (d := vcpkg_platform_root / "include/libpq" ).is_dir ():
44
48
raise ScriptError (f"libpq include directory not found: { d } " )
45
49
print (vcpkg_platform_root .joinpath ("include" ))
46
50
51
+ elif args .cppflags or args .ldflags :
52
+ print ("" )
53
+
47
54
else :
48
55
raise ScriptError ("command not handled" )
49
56
@@ -63,6 +70,21 @@ def parse_cmdline() -> Namespace:
63
70
action = "store_true" ,
64
71
help = "show location of C header files of the client interfaces" ,
65
72
)
73
+ g .add_argument (
74
+ "--includedir-server" ,
75
+ action = "store_true" ,
76
+ help = "show location of C header files for the server" ,
77
+ )
78
+ g .add_argument (
79
+ "--cppflags" ,
80
+ action = "store_true" ,
81
+ help = "(dummy) show CPPFLAGS value used when PostgreSQL was built" ,
82
+ )
83
+ g .add_argument (
84
+ "--ldflags" ,
85
+ action = "store_true" ,
86
+ help = "(dummy) show LDFLAGS value used when PostgreSQL was built" ,
87
+ )
66
88
opt = parser .parse_args ()
67
89
return opt
68
90
You can’t perform that action at this time.
0 commit comments