]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/ignition-cmake0/uuid-do-not-require-pkg-config.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / ignition-cmake0 / uuid-do-not-require-pkg-config.patch
CommitLineData
1e59de90
TL
1diff --git a/cmake/FindUUID.cmake b/cmake/FindUUID.cmake
2index bf055d4..15be822 100644
3--- a/cmake/FindUUID.cmake
4+++ b/cmake/FindUUID.cmake
5@@ -18,4 +18,25 @@
6 if (UNIX)
7 include(IgnPkgConfig)
8 ign_pkg_check_modules(UUID uuid)
9+
10+ # If pkg-config is not available in the system,
11+ # it is neccessary to manually find uuid
12+ if(NOT TARGET UUID::UUID)
13+ find_path(UUID_INCLUDE_DIRS NAMES uuid.h PATH_SUFFIXES uuid)
14+ mark_as_advanced(UUID_INCLUDE_DIRS)
15+
16+ find_library(UUID_LIBRARIES NAMES uuid libuuid)
17+ mark_as_advanced(UUID_LIBRARIES)
18+
19+ if(NOT UUID_INCLUDE_DIRS OR NOT UUID_LIBRARIES)
20+ set(UUID_FOUND false)
21+ else()
22+ set(UUID_FOUND true)
23+ endif()
24+
25+ if(UUID_FOUND)
26+ include(IgnImportTarget)
27+ ign_import_target(UUID)
28+ endif()
29+ endif()
30 endif()