1#
2# Copyright 2017, 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.7.2)
14
15project(libsel4serialserver C)
16
17set(configure_string "")
18
19config_option(
20    LibSel4SerialServerColoredOutput
21    SERIAL_SERVER_COLOURED_OUTPUT
22    "Annotate output with different ansi colours for each client"
23    DEFAULT
24    ON
25)
26mark_as_advanced(LibSel4SerialServerColoredOutput)
27add_config_library(sel4serialserver "${configure_string}")
28
29set(deps src/clientapi.c src/parentapi.c src/server.c)
30
31add_library(sel4serialserver STATIC EXCLUDE_FROM_ALL ${deps})
32target_include_directories(sel4serialserver PUBLIC include)
33target_link_libraries(
34    sel4serialserver
35    PUBLIC
36        muslc
37        sel4
38        sel4vspace
39        sel4simple
40        sel4platsupport
41        utils
42        sel4utils
43        sel4vka
44    PRIVATE sel4_autoconf sel4serialserver_Config
45)
46
47add_library(sel4serialserver_tests STATIC EXCLUDE_FROM_ALL src/test.c)
48target_link_libraries(sel4serialserver_tests sel4serialserver sel4test)
49