summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindUUID.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2016-03-08 21:02:53 +0100
committermanuel <manuel@mausz.at>2016-03-08 21:02:53 +0100
commit9fc8b732737f139d3e466510d75668ab45578960 (patch)
tree76db9bf5cb8cc869be908a5ed3d6f4cca3e3608a /project/cmake/modules/FindUUID.cmake
parentb75e2659df11c23aa921d2eed83c23adc282ed27 (diff)
downloadkodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.tar.gz
kodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.tar.bz2
kodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.zip
sync with upstream
Diffstat (limited to 'project/cmake/modules/FindUUID.cmake')
-rw-r--r--project/cmake/modules/FindUUID.cmake43
1 files changed, 43 insertions, 0 deletions
diff --git a/project/cmake/modules/FindUUID.cmake b/project/cmake/modules/FindUUID.cmake
new file mode 100644
index 0000000..173fac2
--- /dev/null
+++ b/project/cmake/modules/FindUUID.cmake
@@ -0,0 +1,43 @@
1#.rst:
2# FindUUID
3# --------
4# Finds the libuuid library
5#
6# This will will define the following variables::
7#
8# UUID_FOUND - system has libuuid
9# UUID_INCLUDE_DIRS - the libuuid include directory
10# UUID_LIBRARIES - the libuuid libraries
11#
12# and the following imported targets::
13#
14# UUID::UUID - The libuuid library
15
16if(PKG_CONFIG_FOUND)
17 pkg_check_modules(PC_UUID uuid QUIET)
18endif()
19
20find_path(UUID_INCLUDE_DIR uuid/uuid.h
21 PATHS ${PC_UUID_INCLUDEDIR})
22find_library(UUID_LIBRARY uuid
23 PATHS ${PC_UUID_LIBRARY})
24set(UUID_VERSION ${PC_UUID_VERSION})
25
26include(FindPackageHandleStandardArgs)
27find_package_handle_standard_args(UUID
28 REQUIRED_VARS UUID_LIBRARY UUID_INCLUDE_DIR
29 VERSION_VAR UUID_VERSION)
30
31if(UUID_FOUND)
32 set(UUID_LIBRARIES ${UUID_LIBRARY})
33 set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
34
35 if(NOT TARGET UUID::UUID)
36 add_library(UUID::UUID UNKNOWN IMPORTED)
37 set_target_properties(UUID::UUID PROPERTIES
38 IMPORTED_LOCATION "${UUID_LIBRARY}"
39 INTERFACE_INCLUDE_DIRECTORIES "${UUID_INCLUDE_DIR}")
40 endif()
41endif()
42
43mark_as_advanced(UUID_INCLUDE_DIR UUID_LIBRARY)