Fixed UUID find.
authorArmin Novak <armin.novak@gmail.com>
Mon, 27 Jun 2016 08:11:19 +0000 (10:11 +0200)
committerArmin Novak <armin.novak@gmail.com>
Mon, 27 Jun 2016 08:37:24 +0000 (10:37 +0200)
channels/urbdrc/CMakeLists.txt
channels/urbdrc/client/urbdrc_types.h
cmake/FindUUID.cmake

index 995c63b..c7e546f 100644 (file)
@@ -26,7 +26,12 @@ if(NOT WIN32)
 endif()
 
 if(DEVD_FOUND OR UDEV_FOUND)
+       include_directories(${UDEV_INCLUDE_DIR})
        if(UUID_FOUND AND DBUS_GLIB_FOUND AND LIBUSB_1_FOUND)
+               include_directories(${UUID_INCLUDE_DIRS})
+               include_directories(${LIBUSB_1_INCLUDE_DIRS})
+               include_directories(${DBUS_GLIB_INCLUDE_DIRS})
+
                set(URBDRC_DEPENDENCIES_FOUND TRUE)
                message(STATUS "Found all URBDRC dependencies")
        else()
index a3219d7..d506667 100644 (file)
 #include <freerdp/channels/log.h>
 #include <freerdp/utils/msusb.h>
 
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 #include <uuid.h>
-#else
-#include <uuid/uuid.h>
-#endif
 #include <pthread.h>
 #include <semaphore.h>
 
index 88083df..f41d2ed 100644 (file)
 
 
 if (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)
-# in cache already
-set(UUID_FOUND TRUE)
+       # in cache already
+       set(UUID_FOUND TRUE)
 else (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)
-find_path(UUID_INCLUDE_DIR
-NAMES
-uuid.h
-uuid/uuid.h
-PATHS
-${UUID_DIR}/include
-$ENV{UUID_DIR}/include
-$ENV{UUID_DIR}
-${DELTA3D_EXT_DIR}/inc
-$ENV{DELTA_ROOT}/ext/inc
-$ENV{DELTA_ROOT}
-~/Library/Frameworks
-/Library/Frameworks
-/usr/local/include
-/usr/include
-/usr/include/gdal
-/sw/include # Fink
-/opt/local/include # DarwinPorts
-/opt/csw/include # Blastwave
-/opt/include
-[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
-/usr/freeware/include
+       find_path(UUID_INCLUDE_DIR
+               NAMES
+                       uuid.h
+               PATH_SUFFIXES
+                       uuid
+               HINTS
+                       ${UUID_DIR}/include
+                       $ENV{UUID_DIR}/include
+                       $ENV{UUID_DIR}
+                       ${DELTA3D_EXT_DIR}/inc
+                       $ENV{DELTA_ROOT}/ext/inc
+                       $ENV{DELTA_ROOT}
+               PATHS
+                       ~/Library/Frameworks
+                       /Library/Frameworks
+                       /usr/local/include
+                       /usr/include
+                       /usr/include/gdal
+                       /sw/include # Fink
+                       /opt/local/include # DarwinPorts
+                       /opt/csw/include # Blastwave
+                       /opt/include
+                       [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
+                       /usr/freeware/include
+       )
 
-)
+       find_library(UUID_LIBRARY
+               NAMES
+                       uuid ossp-uuid
+               HINTS
+                       ${UUID_DIR}/lib
+                       $ENV{UUID_DIR}/lib
+                       $ENV{UUID_DIR}
+                       ${DELTA3D_EXT_DIR}/lib
+                       $ENV{DELTA_ROOT}/ext/lib
+                       $ENV{DELTA_ROOT}
+                       $ENV{OSG_ROOT}/lib
+               PATHS
+                       ~/Library/Frameworks
+                       /Library/Frameworks
+                       /usr/local/lib
+                       /usr/lib
+                       /sw/lib
+                       /opt/local/lib
+                       /opt/csw/lib
+                       /opt/lib
+                       /usr/freeware/lib64
+       )
 
-find_library(UUID_LIBRARY
-NAMES
-uuid
-PATHS
-${UUID_DIR}/lib
-$ENV{UUID_DIR}/lib
-$ENV{UUID_DIR}
-${DELTA3D_EXT_DIR}/lib
-$ENV{DELTA_ROOT}/ext/lib
-$ENV{DELTA_ROOT}
-$ENV{OSG_ROOT}/lib
-~/Library/Frameworks
-/Library/Frameworks
-/usr/local/lib
-/usr/lib
-/sw/lib
-/opt/local/lib
-/opt/csw/lib
-/opt/lib
-/usr/freeware/lib64
-)
+       find_library(UUID_LIBRARY_DEBUG
+               NAMES
+                       uuidd 
+               HINTS
+                       ${UUID_DIR}/lib
+                       $ENV{UUID_DIR}/lib
+                       $ENV{UUID_DIR}
+                       ${DELTA3D_EXT_DIR}/lib
+                       $ENV{DELTA_ROOT}/ext/lib
+                       $ENV{DELTA_ROOT}
+                       $ENV{OSG_ROOT}/lib
+               PATHS
+                       ~/Library/Frameworks
+                       /Library/Frameworks
+                       /usr/local/lib
+                       /usr/lib
+                       /sw/lib
+                       /opt/local/lib
+                       /opt/csw/lib
+                       /opt/lib
+                       /usr/freeware/lib64
+       )
+       
+       if (NOT UUID_LIBRARY AND BSD)
+               set(UUID_LIBRARY "")
+       endif(NOT UUID_LIBRARY AND BSD)
 
-find_library(UUID_LIBRARY_DEBUG
-NAMES
-uuidd
-PATHS
-${UUID_DIR}/lib
-$ENV{UUID_DIR}/lib
-$ENV{UUID_DIR}
-${DELTA3D_EXT_DIR}/lib
-$ENV{DELTA_ROOT}/ext/lib
-$ENV{DELTA_ROOT}
-$ENV{OSG_ROOT}/lib
-~/Library/Frameworks
-/Library/Frameworks
-/usr/local/lib
-/usr/lib
-/sw/lib
-/opt/local/lib
-/opt/csw/lib
-/opt/lib
-/usr/freeware/lib64
-)
-if (NOT UUID_LIBRARY AND BSD)
-       set(UUID_LIBRARY "")
-endif(NOT UUID_LIBRARY AND BSD)
+       set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
+       set(UUID_LIBRARIES ${UUID_LIBRARY})
 
-set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
-set(UUID_LIBRARIES ${UUID_LIBRARY})
+       if (UUID_INCLUDE_DIRS)
+               if (BSD OR UUID_LIBRARIES)
+                       set(UUID_FOUND TRUE)
+               endif (BSD OR UUID_LIBRARIES)
+       endif (UUID_INCLUDE_DIRS)
 
-if (UUID_INCLUDE_DIRS)
-       if (BSD OR UUID_LIBRARIES)
-               set(UUID_FOUND TRUE)
-       endif (BSD OR UUID_LIBRARIES)
-endif (UUID_INCLUDE_DIRS)
+       if (UUID_FOUND)
+               if (NOT UUID_FIND_QUIETLY)
+                       message(STATUS "Found UUID: ${UUID_LIBRARIES}")
+               endif (NOT UUID_FIND_QUIETLY)
+       else (UUID_FOUND)
+               if (UUID_FIND_REQUIRED)
+                       message(FATAL_ERROR "Could not find UUID")
+               endif (UUID_FIND_REQUIRED)
+       endif (UUID_FOUND)
 
-if (UUID_FOUND)
-       if (NOT UUID_FIND_QUIETLY)
-               message(STATUS "Found UUID: ${UUID_LIBRARIES}")
-       endif (NOT UUID_FIND_QUIETLY)
-else (UUID_FOUND)
-       if (UUID_FIND_REQUIRED)
-               message(FATAL_ERROR "Could not find UUID")
-       endif (UUID_FIND_REQUIRED)
-endif (UUID_FOUND)
-
-# show the UUID_INCLUDE_DIRS and UUID_LIBRARIES variables only in the advanced view
-mark_as_advanced(UUID_INCLUDE_DIRS UUID_LIBRARIES)
+       # show the UUID_INCLUDE_DIRS and UUID_LIBRARIES variables only in the advanced view
+       mark_as_advanced(UUID_INCLUDE_DIRS UUID_LIBRARIES)
 
 endif (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)