forked from baidu/bigflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindLibUUID.cmake
26 lines (20 loc) · 899 Bytes
/
FindLibUUID.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# - Find libuuid
# Find the native LIBUUID includes and library
#
# LIBUUID_INCLUDE_DIRS - where to find uuid/uuid.h, etc.
# LIBUUID_LIBRARIES - List of libraries when using uuid.
# LIBUUID_FOUND - True if uuid found.
IF (LIBUUID_INCLUDE_DIRS)
# Already in cache, be silent
SET(LIBUUID_FIND_QUIETLY TRUE)
ENDIF (LIBUUID_INCLUDE_DIRS)
FIND_PATH(LIBUUID_INCLUDE_DIR uuid/uuid.h)
SET(LIBUUID_NAMES uuid)
FIND_LIBRARY(LIBUUID_LIBRARIES NAMES ${LIBUUID_NAMES})
ADD_LIBRARY(Libuuid STATIC IMPORTED GLOBAL)
SET_PROPERTY(TARGET Libuuid PROPERTY IMPORTED_LOCATION ${LIBUUID_LIBRARIES})
# handle the QUIETLY and REQUIRED arguments and set LIBUUID_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUUID DEFAULT_MSG LIBUUID_LIBRARIES LIBUUID_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBUUID_LIBRARIES LIBUUID_INCLUDE_DIRS)