initial commit
This commit is contained in:
parent
6d3a7c05a2
commit
10b3e96489
12 changed files with 52 additions and 0 deletions
30
find.cmake
Normal file
30
find.cmake
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# SPDX-FileCopyrightText: 2026 <copyright holder> <email>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# - Try to find
|
||||
# Once done this will define
|
||||
# _FOUND - System has
|
||||
# _INCLUDE_DIRS - The include directories
|
||||
# _LIBRARIES - The libraries needed to use
|
||||
# _DEFINITIONS - Compiler switches required for using
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_ QUIET )
|
||||
set(_DEFINITIONS ${PC__CFLAGS_OTHER})
|
||||
|
||||
find_path(_INCLUDE_DIR
|
||||
HINTS ${PC__INCLUDEDIR} ${PC__INCLUDE_DIRS}
|
||||
PATH_SUFFIXES )
|
||||
|
||||
find_library(_LIBRARY NAMES
|
||||
HINTS ${PC__LIBDIR} ${PC__LIBRARY_DIRS} )
|
||||
|
||||
set(_LIBRARIES ${_LIBRARY} )
|
||||
set(_INCLUDE_DIRS ${_INCLUDE_DIR} )
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set _FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args( DEFAULT_MSG
|
||||
_LIBRARY _INCLUDE_DIR)
|
||||
mark_as_advanced(_INCLUDE_DIR _LIBRARY )
|
||||
Loading…
Add table
Add a link
Reference in a new issue