2 # Find the native FLAC includes and libraries
4 # FLAC_INCLUDE_DIRS - where to find FLAC headers.
5 # FLAC_LIBRARIES - List of libraries when using libFLAC.
6 # FLAC_FOUND - True if libFLAC found.
9 # Already in cache, be silent
10 set(FLAC_FIND_QUIETLY TRUE)
11 endif(FLAC_INCLUDE_DIR)
13 find_path(FLAC_INCLUDE_DIR FLAC/stream_decoder.h)
15 # MSVC built libraries can name them *_static, which is good as it
16 # distinguishes import libraries from static libraries with the same extension.
17 find_library(FLAC_LIBRARY NAMES FLAC libFLAC libFLAC_dynamic libFLAC_static)
19 # Handle the QUIETLY and REQUIRED arguments and set FLAC_FOUND to TRUE if
20 # all listed variables are TRUE.
21 include(FindPackageHandleStandardArgs)
22 find_package_handle_standard_args(FLAC DEFAULT_MSG FLAC_LIBRARY FLAC_INCLUDE_DIR)
25 set(FLAC_LIBRARIES ${FLAC_LIBRARY})
27 set(FLAC_LIBRARIES ${FLAC_LIBRARIES} wsock32)
29 set(FLAC_INCLUDE_DIRS ${FLAC_INCLUDE_DIR})