1# Copyright (c) 2021 HPMicro 2# SPDX-License-Identifier: BSD-3-Clause 3 4string(TOUPPER ${CONFIG_CODEC} CONFIG_CODEC_UPPER) 5string(TOLOWER ${CONFIG_CODEC} CONFIG_CODEC_LOWER) 6if((NOT ${CONFIG_CODEC_LOWER} STREQUAL "sgtl5000") AND (NOT ${CONFIG_CAMERA_LOWER} STREQUAL "wm8960")) 7message(FATAL_ERROR "${CONFIG_CODEC} is not supported, only \"sgtl5000\" or \"wm8960\" is supported") 8else() 9sdk_compile_definitions(-DCONFIG_CODEC_${CONFIG_CODEC_UPPER}=1) 10add_subdirectory(${CONFIG_CODEC_LOWER}) 11endif() 12 13