Mercurial > hg > orthanc
changeset 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 | 01905b67f8b5 |
children | d59521c395d9 |
files | Resources/CMake/UuidConfiguration.cmake |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/UuidConfiguration.cmake Thu Apr 04 15:14:12 2019 +0200 +++ b/Resources/CMake/UuidConfiguration.cmake Thu Apr 04 15:51:37 2019 +0200 @@ -114,12 +114,18 @@ message(FATAL_ERROR "Please install uuid-dev, e2fsprogs (OpenBSD) or e2fsprogs-libuuid (FreeBSD)") endif() - check_library_exists(uuid uuid_generate_random "" HAVE_UUID_LIB) - if (NOT HAVE_UUID_LIB) + find_library(LIBUUID uuid + PATHS + /usr/lib + /usr/local/lib + ) + + check_library_exists(${LIBUUID} uuid_generate_random "" HAVE_LIBUUID) + if (NOT HAVE_LIBUUID) message(FATAL_ERROR "Unable to find the uuid library") endif() - link_libraries(uuid) + link_libraries(${LIBUUID}) endif() endif()