1#
2# Copyright 2018, Data61
3# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4# ABN 41 687 119 230.
5#
6# This software may be distributed and modified according to the terms of
7# the BSD 2-Clause license. Note that NO WARRANTY is provided.
8# See "LICENSE_BSD2.txt" for details.
9#
10# @TAG(DATA61_BSD)
11#
12
13cmake_minimum_required(VERSION 3.8.2)
14
15project(TimeServer C)
16
17if(KernelArchARM)
18    set(CAmkESDTS ON CACHE BOOL "" FORCE)
19endif()
20set(CAmkESCPP ON CACHE BOOL "" FORCE)
21
22if("${KernelPlatform}" STREQUAL "pc99")
23    list(APPEND TimeServerPlatSources src/plat/pc99/plat.c)
24endif()
25
26# The imx8 boards (imx8mm-evk, imx8mq-evk) share the same timer device configuration
27if("${KernelPlatform}" MATCHES "imx8.*")
28    set(PlatPrefix "imx8")
29else()
30    set(PlatPrefix "${KernelPlatform}")
31endif()
32
33DeclareCAmkESComponent(TimeServer SOURCES src/time_server.c ${TimeServerPlatSources})
34
35CAmkESAddCPPInclude("${CMAKE_CURRENT_LIST_DIR}/include/plat/${PlatPrefix}/")
36