1# Copyright 2021 hpmicro 2# SPDX-License-Identifier: BSD-3-Clause 3 4string(TOUPPER ${CONFIG_CAMERA} CONFIG_CAMERA_UPPER) 5string(TOLOWER ${CONFIG_CAMERA} CONFIG_CAMERA_LOWER) 6if((NOT ${CONFIG_CAMERA_LOWER} STREQUAL "ov7725") AND (NOT ${CONFIG_CAMERA_LOWER} STREQUAL "ov5640")) 7message(FATAL_ERROR "${CONFIG_CAMERA} is not supported, only \"ov7725\" or \"ov5640\" is supported") 8else() 9sdk_compile_definitions(-DCONFIG_CAMERA_${CONFIG_CAMERA_UPPER}=1) 10sdk_inc(.) 11add_subdirectory(${CONFIG_CAMERA_LOWER}) 12endif() 13 14