blob: 2a25aec834a32edd1db4667bdea4b85948072660 [file] [log] [blame]
Kshitij Sisodiaeb9dfa72022-05-09 11:35:24 +01001#----------------------------------------------------------------------------
2# Copyright (c) 2022 Arm Limited. All rights reserved.
3# SPDX-License-Identifier: Apache-2.0
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#----------------------------------------------------------------------------
17
18#########################################################
19# This CMake project just consolidates all APIs to help #
20# generate CMSIS-pack from this repository. Projects #
21# that need to be included in the pack, should be added #
22# here along with their dependencies. #
23#########################################################
24
25cmake_minimum_required(VERSION 3.15.6)
26
27project(ml-embedded-eval-kit-api
28 DESCRIPTION "Platform agnostic API for all examples.")
29
30set(SOURCE_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../../source)
31
32set(LOGGING_PROJECT_DIR ${SOURCE_ROOT}/log)
33set(ARM_MATH_PROJECT_DIR ${SOURCE_ROOT}/math)
34set(API_COMMON_PROJECT_DIR ${SOURCE_ROOT}/application/api/common)
35set(API_UC_PROJECT_DIR ${SOURCE_ROOT}/application/api/use_case)
36
37# Add dependencies first:
38if (NOT TARGET arm_math)
39 add_subdirectory(${ARM_MATH_PROJECT_DIR} ${CMAKE_BINARY_DIR}/math)
40endif()
41
42if (NOT TARGET log)
43 add_subdirectory(${LOGGING_PROJECT_DIR} ${CMAKE_BINARY_DIR}/log)
44endif()
45
46# Add common part and the APIs:
47add_subdirectory(${API_COMMON_PROJECT_DIR} ${CMAKE_BINARY_DIR}/common)
48
49file(GLOB UC_API_LIST "${API_UC_PROJECT_DIR}/*")
50
51foreach(API ${UC_API_LIST})
52 add_subdirectory(${API} ${CMAKE_BINARY_DIR}/${API})
53endforeach()