-
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.
Merge pull request #1660 from eisenhauer/NVStreamDP
Shared memory data plane based on GT NVStream
- Loading branch information
Showing
8 changed files
with
1,035 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#------------------------------------------------------------------------------# | ||
# Distributed under the OSI-approved Apache License, Version 2.0. See | ||
# accompanying file Copyright.txt for details. | ||
#------------------------------------------------------------------------------# | ||
# | ||
# FindNVSTREAM | ||
# ----------- | ||
# | ||
# Try to find the NVSTREAM library | ||
# | ||
# This module defines the following variables: | ||
# | ||
# NVSTREAM_FOUND - System has NVSTREAM | ||
# NVSTREAM_INCLUDE_DIRS - The NVSTREAM include directory | ||
# NVSTREAM_LIBRARIES - Link these to use NVSTREAM | ||
# NVSTREAM_VERSION - Version of the NVSTREAM library to support | ||
# | ||
# and the following imported targets: | ||
# NVStream::NVStream - The core NVSTREAM library | ||
# | ||
# You can also set the following variable to help guide the search: | ||
# NVSTREAM_ROOT - The install prefix for NVSTREAM 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(NOT NVSTREAM_FOUND) | ||
if((NOT NVSTREAM_ROOT) AND (NOT (ENV{NVSTREAM_ROOT} STREQUAL ""))) | ||
set(NVSTREAM_ROOT "$ENV{NVSTREAM_ROOT}") | ||
endif() | ||
if(NVSTREAM_ROOT) | ||
set(NVSTREAM_INCLUDE_OPTS HINTS ${NVSTREAM_ROOT}/include NO_DEFAULT_PATHS) | ||
set(NVSTREAM_LIBRARY_OPTS | ||
HINTS ${NVSTREAM_ROOT}/lib ${NVSTREAM_ROOT}/lib64 | ||
NO_DEFAULT_PATHS | ||
) | ||
endif() | ||
|
||
find_path(NVSTREAM_INCLUDE_DIR nvs/store.h ${NVSTREAM_INCLUDE_OPTS}) | ||
find_library(NVSTREAM_LIBRARY libyuma.a ${NVSTREAM_LIBRARY_OPTS}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(NVStream | ||
FOUND_VAR NVSTREAM_FOUND | ||
VERSION_VAR NVSTREAM_VERSION | ||
REQUIRED_VARS NVSTREAM_LIBRARY NVSTREAM_INCLUDE_DIR | ||
) | ||
message(STATUS "NVSTREAM_FOUND is ${NVSTREAM_FOUND}, LIB is ${NVSTREAM_LIBRARY}") | ||
if(NVSTREAM_FOUND) | ||
set(NVSTREAM_INCLUDE_DIRS ${NVSTREAM_INCLUDE_DIR}) | ||
set(NVSTREAM_LIBRARIES ${NVSTREAM_LIBRARY}) | ||
if(NVSTREAM_FOUND AND NOT TARGET NVStream::NVStream) | ||
message(STATUS "ADDING LIBRARY NVSTREAM_FOUND is ${NVSTREAM_FOUND}, LIB is ${NVSTREAM_LIBRARY}") | ||
add_library(NVStream::NVStream UNKNOWN IMPORTED) | ||
set_target_properties(NVStream::NVStream PROPERTIES | ||
IMPORTED_LOCATION "${NVSTREAM_LIBRARY}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${NVSTREAM_INCLUDE_DIR}" | ||
) | ||
endif() | ||
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
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.