comparison Resources/CMake/UuidConfiguration.cmake @ 3337:9c8e119d0c5b

fix detection of uuid on freebsd
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Apr 2019 15:51:37 +0200
parents afc38fd21c78
children
comparison
equal deleted inserted replaced
3336:01905b67f8b5 3337:9c8e119d0c5b
112 CHECK_INCLUDE_FILE(uuid/uuid.h HAVE_UUID_H) 112 CHECK_INCLUDE_FILE(uuid/uuid.h HAVE_UUID_H)
113 if (NOT HAVE_UUID_H) 113 if (NOT HAVE_UUID_H)
114 message(FATAL_ERROR "Please install uuid-dev, e2fsprogs (OpenBSD) or e2fsprogs-libuuid (FreeBSD)") 114 message(FATAL_ERROR "Please install uuid-dev, e2fsprogs (OpenBSD) or e2fsprogs-libuuid (FreeBSD)")
115 endif() 115 endif()
116 116
117 check_library_exists(uuid uuid_generate_random "" HAVE_UUID_LIB) 117 find_library(LIBUUID uuid
118 if (NOT HAVE_UUID_LIB) 118 PATHS
119 /usr/lib
120 /usr/local/lib
121 )
122
123 check_library_exists(${LIBUUID} uuid_generate_random "" HAVE_LIBUUID)
124 if (NOT HAVE_LIBUUID)
119 message(FATAL_ERROR "Unable to find the uuid library") 125 message(FATAL_ERROR "Unable to find the uuid library")
120 endif() 126 endif()
121 127
122 link_libraries(uuid) 128 link_libraries(${LIBUUID})
123 endif() 129 endif()
124 130
125 endif() 131 endif()