INCLUDE(FindPackageHandleStandardArgs)

IF (NOT FLAC_INCLUDE_DIR)
    FIND_PATH(FLAC_INCLUDE_DIR FLAC/stream_encoder.h HINTS $ENV{FLAC_DIR})
ENDIF()

IF (NOT FLAC_LIBRARIES)
    FIND_LIBRARY(FLAC_LIBRARIES FLAC HINTS $ENV{FLAC_DIR})
ENDIF()

MARK_AS_ADVANCED(FLAC_INCLUDE_DIR)
MARK_AS_ADVANCED(FLAC_LIBRARIES)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(
    FLAC
    DEFAULT_MSG
    FLAC_LIBRARIES
    FLAC_INCLUDE_DIR
)

