meson: Add prefix=/usr/local/pgsql to default_options
authorAndres Freund <[email protected]>
Sat, 1 Oct 2022 19:39:12 +0000 (12:39 -0700)
committerAndres Freund <[email protected]>
Sat, 1 Oct 2022 19:41:37 +0000 (12:41 -0700)
autoconf set PREFIX to /usr/local/pgsql, so using the same default for meson
makes sense. The effect on windows is that installation defaults to installing
to C:/usr/local/pgsql rather than meson's default of C:/, which doesn't seem
perfect, but OK enough.

Signed-off-by: Junwang Zhao <[email protected]>
Author: Junwang Zhao <[email protected]>
Discussion: https://postgr.es/CAEG8a3LGWE-gG6vuddmH91RORhi8gWs0mMB-hcTmP3_NVgM7dg@mail.gmail.com

meson.build

index c3bbb1c5fcae0a56d5944e5fd6c54783cf30f140..7bf798674ce742fe31f5cc5047f726a11b98da67 100644 (file)
@@ -16,6 +16,10 @@ project('postgresql',
   default_options: [
     'warning_level=1', #-Wall equivalent
     'buildtype=release',
+    # For compatibility with the autoconf build, set a default prefix. This
+    # works even on windows, where it's a drive-relative path (i.e. when on
+    # d:/sompath it'll install to d:/usr/local/pgsql)
+    'prefix=/usr/local/pgsql',
   ]
 )