mirror of
https://github.com/OpenAMP/libmetal.git
synced 2026-02-07 21:24:12 +08:00
Fix warnings spotted by cmake: The package name passed to `find_package_handle_standard_args`(HUGETLBFS) does not match the name of the calling package(HugeTLBFS). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Tested with cmake 3.5 and 3.17. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
35 lines
961 B
CMake
35 lines
961 B
CMake
# 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)
|