-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Greg Eisenhauer
committed
Apr 2, 2021
1 parent
7fc326d
commit d8ee0aa
Showing
10 changed files
with
1,368 additions
and
236 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,65 @@ | ||
#------------------------------------------------------------------------------# | ||
# Distributed under the OSI-approved Apache License, Version 2.0. See | ||
# accompanying file Copyright.txt for details. | ||
#------------------------------------------------------------------------------# | ||
# | ||
# FindDaos | ||
# ----------- | ||
# | ||
# Try to find the Daos library | ||
# | ||
# This module defines the following variables: | ||
# | ||
# Daos_FOUND - System has Daos | ||
# Daos_INCLUDE_DIRS - The Daos include directory | ||
# Daos_LIBRARIES - Link these to use Daos | ||
# | ||
# and the following imported targets: | ||
# Daos::Daos - The core Daos library | ||
# | ||
# You can also set the following variable to help guide the search: | ||
# Daos_ROOT - The install prefix for Daos containing the | ||
# include and lib folders | ||
# Note: this can be set as a CMake variable or an | ||
# environment variable. If specified as a CMake | ||
# variable, it will override any setting specified | ||
# as an environment variable. | ||
|
||
if(CMAKE_VERSION VERSION_LESS 3.12) | ||
if((NOT Daos_ROOT) AND (NOT (ENV{Daos_ROOT} STREQUAL ""))) | ||
set(Daos_ROOT "$ENV{Daos_ROOT}") | ||
endif() | ||
if(Daos_ROOT) | ||
set(Daos_INCLUDE_OPTS HINTS ${Daos_ROOT}/include NO_DEFAULT_PATHS) | ||
set(Daos_LIBRARY_OPTS | ||
HINTS ${Daos_ROOT}/lib ${Daos_ROOT}/lib64 | ||
NO_DEFAULT_PATHS | ||
) | ||
endif() | ||
endif() | ||
|
||
|
||
message(STATUS "Daos_ROOT is is \"$ENV{Daos_ROOT}\"") | ||
find_path(Daos_INCLUDE_DIR daos_api.h ${Daos_INCLUDE_OPTS}) | ||
find_library(Daos_LIBRARY libdaos.so ${Daos_LIBRARY_OPTS}) | ||
find_library(DFS_LIBRARY libdfs.so ${Daos_LIBRARY_OPTS}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Daos | ||
FOUND_VAR Daos_FOUND | ||
REQUIRED_VARS Daos_LIBRARY Daos_INCLUDE_DIR | ||
) | ||
|
||
if(Daos_FOUND) | ||
set(Daos_INCLUDE_DIRS ${Daos_INCLUDE_DIR}) | ||
set(Daos_LIBRARIES ${Daos_LIBRARY} ${DFS_LIBRARY}) | ||
message(STATUS "Daos Libraries \"${Daos_LIBRARIES}\"") | ||
if(NOT TARGET Daos::Daos) | ||
add_library(Daos::Daos UNKNOWN IMPORTED) | ||
set_target_properties(Daos::Daos PROPERTIES | ||
IMPORTED_LOCATION "${Daos_LIBRARY}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${Daos_INCLUDE_DIR}" | ||
INTERFACE_LINK_LIBRARIES "${Daos_LIBRARIES}" | ||
) | ||
endif() | ||
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
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.