Skip to content

Commit 2416fdb

Browse files
committed
meson: Add support for detecting ossp-uuid without pkg-config
This is necessary as ossp-uuid on windows installs neither a pkg-config nor a cmake dependency information. Nor is there another supported uuid implementation available on windows. Reported-by: Dave Page <dpage@pgadmin.org> Reviewed-by: Tristan Partin <tristan@partin.io> Discussion: https://postgr.es/m/20240709065101.xhc74r3mdg2lmn4w@awork3.anarazel.de Backpatch: 16-, where meson support was added
1 parent 7ed2ce0 commit 2416fdb

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

meson.build

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1386,9 +1386,26 @@ if uuidopt != 'none'
13861386
uuidfunc = 'uuid_to_string'
13871387
uuidheader = 'uuid.h'
13881388
elif uuidopt == 'ossp'
1389-
uuid = dependency('ossp-uuid', required: true)
1389+
uuid = dependency('ossp-uuid', required: false)
13901390
uuidfunc = 'uuid_export'
13911391
uuidheader = 'uuid.h'
1392+
1393+
# Hardcoded lookup for ossp-uuid. This is necessary as ossp-uuid on
1394+
# windows installs neither a pkg-config nor a cmake dependency
1395+
# information. Nor is there another supported uuid implementation
1396+
# available on windows.
1397+
#
1398+
# Sometimes the ossp-uuid library is named 'uuid' sometimes 'ossp-uuid'
1399+
if not uuid.found()
1400+
uuid = cc.find_library('ossp-uuid',
1401+
required: false, dirs: test_lib_d,
1402+
has_headers: uuidheader, header_include_directories: postgres_inc)
1403+
endif
1404+
if not uuid.found()
1405+
uuid = cc.find_library('uuid',
1406+
required: true, dirs: test_lib_d,
1407+
has_headers: uuidheader, header_include_directories: postgres_inc)
1408+
endif
13921409
else
13931410
error('unknown uuid build option value: @0@'.format(uuidopt))
13941411
endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy