PostgreSQL native library for Tarantool programming language
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FindUUID.cmake 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # - Try to find UUID
  2. # Once done this will define
  3. #
  4. # UUID_FOUND - system has UUID
  5. # UUID_INCLUDE_DIRS - the UUID include directory
  6. # UUID_LIBRARIES - Link these to use UUID
  7. # UUID_DEFINITIONS - Compiler switches required for using UUID
  8. #
  9. # Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
  10. #
  11. # Redistribution and use is allowed according to the terms of the New
  12. # BSD license.
  13. # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
  14. #
  15. if (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)
  16. # in cache already
  17. set(UUID_FOUND TRUE)
  18. else (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)
  19. find_path(UUID_INCLUDE_DIR
  20. NAMES
  21. uuid.h
  22. PATH_SUFFIXES
  23. uuid
  24. HINTS
  25. ${UUID_DIR}/include
  26. $ENV{UUID_DIR}/include
  27. $ENV{UUID_DIR}
  28. ${DELTA3D_EXT_DIR}/inc
  29. $ENV{DELTA_ROOT}/ext/inc
  30. $ENV{DELTA_ROOT}
  31. PATHS
  32. ~/Library/Frameworks
  33. /Library/Frameworks
  34. /usr/local/include
  35. /usr/include
  36. /usr/include/gdal
  37. /sw/include # Fink
  38. /opt/csw/include # Blastwave
  39. /opt/include
  40. [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
  41. /usr/freeware/include
  42. )
  43. find_library(UUID_LIBRARY
  44. NAMES
  45. uuid ossp-uuid
  46. HINTS
  47. ${UUID_DIR}/lib
  48. $ENV{UUID_DIR}/lib
  49. $ENV{UUID_DIR}
  50. ${DELTA3D_EXT_DIR}/lib
  51. $ENV{DELTA_ROOT}/ext/lib
  52. $ENV{DELTA_ROOT}
  53. $ENV{OSG_ROOT}/lib
  54. PATHS
  55. ~/Library/Frameworks
  56. /Library/Frameworks
  57. /usr/local/lib
  58. /usr/lib
  59. /sw/lib
  60. /opt/csw/lib
  61. /opt/lib
  62. /usr/freeware/lib64
  63. )
  64. find_library(UUID_LIBRARY_DEBUG
  65. NAMES
  66. uuidd
  67. HINTS
  68. ${UUID_DIR}/lib
  69. $ENV{UUID_DIR}/lib
  70. $ENV{UUID_DIR}
  71. ${DELTA3D_EXT_DIR}/lib
  72. $ENV{DELTA_ROOT}/ext/lib
  73. $ENV{DELTA_ROOT}
  74. $ENV{OSG_ROOT}/lib
  75. PATHS
  76. ~/Library/Frameworks
  77. /Library/Frameworks
  78. /usr/local/lib
  79. /usr/lib
  80. /sw/lib
  81. /opt/csw/lib
  82. /opt/lib
  83. /usr/freeware/lib64
  84. )
  85. if (NOT UUID_LIBRARY AND BSD)
  86. set(UUID_LIBRARY "")
  87. endif(NOT UUID_LIBRARY AND BSD)
  88. set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
  89. set(UUID_LIBRARIES ${UUID_LIBRARY})
  90. if (UUID_INCLUDE_DIRS)
  91. if (BSD OR UUID_LIBRARIES)
  92. set(UUID_FOUND TRUE)
  93. endif (BSD OR UUID_LIBRARIES)
  94. endif (UUID_INCLUDE_DIRS)
  95. if (UUID_FOUND)
  96. if (NOT UUID_FIND_QUIETLY)
  97. message(STATUS "Found UUID: ${UUID_LIBRARIES}")
  98. endif (NOT UUID_FIND_QUIETLY)
  99. else (UUID_FOUND)
  100. if (UUID_FIND_REQUIRED)
  101. message(FATAL_ERROR "Could not find UUID")
  102. endif (UUID_FIND_REQUIRED)
  103. endif (UUID_FOUND)
  104. # show the UUID_INCLUDE_DIRS and UUID_LIBRARIES variables only in the advanced view
  105. mark_as_advanced(UUID_INCLUDE_DIRS UUID_LIBRARIES)
  106. endif (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)