建立工程,成功创建两个虚拟串口
This commit is contained in:
34
source/OpenAMP/libmetal/cmake/modules/FindHugeTLBFS.cmake
Normal file
34
source/OpenAMP/libmetal/cmake/modules/FindHugeTLBFS.cmake
Normal file
@@ -0,0 +1,34 @@
|
||||
# FindHugeTLBFS
|
||||
# --------
|
||||
#
|
||||
# Find HugeTLBFS
|
||||
#
|
||||
# Find the native HugeTLBFS includes and library This module defines
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# HUGETLBFS_INCLUDE_DIR, where to find hugetlbfs.h, etc.
|
||||
# HUGETLBFS_LIBRARIES, the libraries needed to use HugeTLBFS.
|
||||
# HUGETLBFS_FOUND, If false, do not try to use HugeTLBFS.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# HUGETLBFS_LIBRARY, where to find the HugeTLBFS library.
|
||||
|
||||
find_path (HUGETLBFS_INCLUDE_DIR hugetlbfs.h)
|
||||
|
||||
set (HUGETLBFS_NAMES ${HUGETLBFS_NAMES} hugetlbfs)
|
||||
find_library (HUGETLBFS_LIBRARY NAMES ${HUGETLBFS_NAMES})
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set HUGETLBFS_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include (FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS (HUGETLBFS DEFAULT_MSG HUGETLBFS_LIBRARY HUGETLBFS_INCLUDE_DIR)
|
||||
|
||||
if (HUGETLBFS_FOUND)
|
||||
set (HUGETLBFS_LIBRARIES ${HUGETLBFS_LIBRARY})
|
||||
endif (HUGETLBFS_FOUND)
|
||||
|
||||
mark_as_advanced (HUGETLBFS_LIBRARY HUGETLBFS_INCLUDE_DIR)
|
||||
46
source/OpenAMP/libmetal/cmake/modules/FindLibRt.cmake
Normal file
46
source/OpenAMP/libmetal/cmake/modules/FindLibRt.cmake
Normal file
@@ -0,0 +1,46 @@
|
||||
#.rst:
|
||||
# FindLibRt
|
||||
# --------
|
||||
#
|
||||
# Find the native realtime includes and library.
|
||||
#
|
||||
# IMPORTED Targets
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module defines :prop_tgt:`IMPORTED` target ``LIBRT::LIBRT``, if
|
||||
# LIBRT has been found.
|
||||
#
|
||||
# Result Variables
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# LIBRT_INCLUDE_DIRS - where to find time.h, etc.
|
||||
# LIBRT_LIBRARIES - List of libraries when using librt.
|
||||
# LIBRT_FOUND - True if realtime library found.
|
||||
#
|
||||
# Hints
|
||||
# ^^^^^
|
||||
#
|
||||
# A user may set ``LIBRT_ROOT`` to a realtime installation root to tell this
|
||||
# module where to look.
|
||||
|
||||
find_path(LIBRT_INCLUDE_DIRS
|
||||
NAMES time.h
|
||||
PATHS ${LIBRT_ROOT}/include/
|
||||
)
|
||||
find_library(LIBRT_LIBRARIES rt)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibRt DEFAULT_MSG LIBRT_LIBRARIES LIBRT_INCLUDE_DIRS)
|
||||
mark_as_advanced(LIBRT_INCLUDE_DIRS LIBRT_LIBRARIES)
|
||||
|
||||
if(LIBRT_FOUND)
|
||||
if(NOT TARGET LIBRT::LIBRT)
|
||||
add_library(LIBRT::LIBRT UNKNOWN IMPORTED)
|
||||
set_target_properties(LIBRT::LIBRT PROPERTIES
|
||||
IMPORTED_LOCATION "${LIBRT_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBRT_INCLUDE_DIRS}")
|
||||
endif()
|
||||
endif()
|
||||
34
source/OpenAMP/libmetal/cmake/modules/FindLibSysFS.cmake
Normal file
34
source/OpenAMP/libmetal/cmake/modules/FindLibSysFS.cmake
Normal file
@@ -0,0 +1,34 @@
|
||||
# FindLibSysFS
|
||||
# --------
|
||||
#
|
||||
# Find LibSysFS
|
||||
#
|
||||
# Find the native LibSysFS includes and library This module defines
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# LIBSYSFS_INCLUDE_DIR, where to find libsysfs.h, etc.
|
||||
# LIBSYSFS_LIBRARIES, the libraries needed to use LibSysFS.
|
||||
# LIBSYSFS_FOUND, If false, do not try to use LibSysFS.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# LIBSYSFS_LIBRARY, where to find the LibSysFS library.
|
||||
|
||||
find_path (LIBSYSFS_INCLUDE_DIR sysfs/libsysfs.h)
|
||||
|
||||
set (LIBSYSFS_NAMES ${LIBSYSFS_NAMES} sysfs)
|
||||
find_library (LIBSYSFS_LIBRARY NAMES ${LIBSYSFS_NAMES})
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBSYSFS_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include (FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS (LIBSYSFS DEFAULT_MSG LIBSYSFS_LIBRARY LIBSYSFS_INCLUDE_DIR)
|
||||
|
||||
if (LIBSYSFS_FOUND)
|
||||
set (LIBSYSFS_LIBRARIES ${LIBSYSFS_LIBRARY})
|
||||
endif (LIBSYSFS_FOUND)
|
||||
|
||||
mark_as_advanced (LIBSYSFS_LIBRARY LIBSYSFS_INCLUDE_DIR)
|
||||
Reference in New Issue
Block a user