forked from boutproject/BOUT-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configure option to use system UUID generator
- Loading branch information
Showing
8 changed files
with
399 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# FindLibuuid | ||
# ---------- | ||
# | ||
# Find a libuuid UUID generator library | ||
# | ||
# This module will define the following variables: | ||
# | ||
# :: | ||
# | ||
# Libuuid_FOUND - true if Libuuid was found | ||
# Libuuid_INCLUDE_DIRS - Location of the Libuuid includes | ||
# Libuuid_LIBRARIES - Required libraries | ||
# | ||
# This module will also export the ``Libuuid::libuuid`` target. | ||
# | ||
# You can also set the following variables: | ||
# | ||
# ``Libuuid_ROOT`` | ||
# Specify the path to the Libuuid installation to use | ||
# | ||
# ``Libuuid_DEBUG`` | ||
# Set to TRUE to get extra debugging output | ||
|
||
include (FindPackageHandleStandardArgs) | ||
|
||
if (WIN32) | ||
find_package_handle_standard_args(Libuuid DEFAULT_MSG) | ||
return() | ||
endif() | ||
|
||
if (APPLE) | ||
find_library(CFLIB CoreFoundation) | ||
find_package_handle_standard_args(Libuuid DEFAULT_MSG CFLIB) | ||
mark_as_advanced(${CFLIB}) | ||
|
||
if (Libuuid_FOUND AND NOT TARGET Libuuid::libuuid) | ||
add_library(Libuuid::libuuid UNKNOWN IMPORTED) | ||
set_target_properties(Libuuid::libuuid PROPERTIES | ||
IMPORTED_LOCATION ${CFLIB} | ||
) | ||
endif() | ||
return() | ||
endif () | ||
|
||
find_path(Libuuid_INCLUDE_DIRS uuid/uuid.h) | ||
find_library(Libuuid_LIBRARIES uuid) | ||
|
||
find_package_handle_standard_args(Libuuid DEFAULT_MSG Libuuid_LIBRARIES Libuuid_INCLUDE_DIRS) | ||
|
||
mark_as_advanced(Libuuid_LIBRARIES Libuuid_INCLUDE_DIRS) | ||
|
||
if (Libuuid_FOUND AND NOT TARGET Libuuid::libuuid) | ||
add_library(Libuuid::libuuid UNKNOWN IMPORTED) | ||
set_target_properties(Libuuid::libuuid PROPERTIES | ||
IMPORTED_LOCATION "${Libuuid_LIBRARIES}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${Libuuid_INCLUDE_DIRS}" | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.