File: FindFLAC.cmake

package info (click to toggle)
kodi-audioencoder-flac 19.0.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 480 kB
  • sloc: cpp: 237; xml: 17; makefile: 10
file content (21 lines) | stat: -rw-r--r-- 667 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# - Try to find FLAC
# Once done this will define
#
# FLAC_FOUND - system has libFLAC
# FLAC_INCLUDE_DIRS - the libFLAC include directory
# FLAC_LIBRARIES - The libFLAC libraries

find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
  pkg_check_modules(PC_FLAC flac QUIET)
endif()

find_path(FLAC_INCLUDE_DIRS FLAC/stream_decoder.h
                            PATHS ${PC_FLAC_INCLUDEDIR})
find_library(FLAC_LIBRARIES NAMES FLAC libFLAC_static
                            PATHS ${PC_FLAC_LIBDIR})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(FLAC REQUIRED_VARS FLAC_INCLUDE_DIRS FLAC_LIBRARIES)

mark_as_advanced(FLAC_INCLUDE_DIRS FLAC_LIBRARIES)