Skip to content

Commit 5f565b0

Browse files
committed
Fix meson build with -Duuid=ossp when using version older than 0.60
The package for the UUID library may be named "uuid" or "ossp-uuid", and meson.build has been using a single call of dependency() with multiple names, something only supported since meson 0.60.0. The minimum version of meson supported by Postgres is 0.57.2 on HEAD, since f039c22, and 0.54 on stable branches down to 16. Author: Oreo Yang <oreo.yang@hotmail.com> Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Discussion: https://postgr.es/m/OS3P301MB01656E6F91539770682B1E77E711A@OS3P301MB0165.JPNP301.PROD.OUTLOOK.COM Backpatch-through: 16
1 parent b585f25 commit 5f565b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

meson.build

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,10 @@ if uuidopt != 'none'
15791579
elif uuidopt == 'ossp'
15801580
# In upstream, the package and library is called just 'uuid', but many
15811581
# distros change it to 'ossp-uuid'.
1582-
uuid = dependency('ossp-uuid', 'uuid', required: false)
1582+
uuid = dependency('ossp-uuid', required: false)
1583+
if not uuid.found()
1584+
uuid = dependency('uuid', required: false)
1585+
endif
15831586
uuidfunc = 'uuid_export'
15841587
uuidheader = 'uuid.h'
15851588

0 commit comments

Comments
 (0)