blob: 20e4f1b552d28c5880078cd8992751f05e87e6fb [file] [log] [blame]
Gabor Toth172659d2023-04-27 08:51:21 +02001#-------------------------------------------------------------------------------
2# Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
8include(../../deployment.cmake REQUIRED)
9
10#-------------------------------------------------------------------------------
11# Options and variables
12#-------------------------------------------------------------------------------
13set(BUILD_SHARED_LIBS On CACHE BOOL "Determine if a shared library is being built.")
14if(NOT BUILD_SHARED_LIBS)
15 message(FATAL_ERROR "Building static library is not yet supported. Call cmake with -DBUILD_SHARED_LIBS=1")
16endif()
17
18#-------------------------------------------------------------------------------
Gabor Tothee2e7cb2024-10-07 17:02:56 +020019# The CMakeLists.txt for building the libpsats deployment for arm-linux
Gabor Toth172659d2023-04-27 08:51:21 +020020#
Gabor Tothee2e7cb2024-10-07 17:02:56 +020021# Used for building the libpsats library for the arm-linux environment. Used for
Gabor Toth172659d2023-04-27 08:51:21 +020022# locating and accessing services from a Linux userspace client. Service
23# instances can be located in any supported secure processing environment.
24#-------------------------------------------------------------------------------
25include(${TS_ROOT}/environments/arm-linux/env_shared_lib.cmake)
Gabor Tothee2e7cb2024-10-07 17:02:56 +020026project(psats LANGUAGES CXX C)
Gabor Toth172659d2023-04-27 08:51:21 +020027
Gabor Tothee2e7cb2024-10-07 17:02:56 +020028add_library(psats)
Gabor Toth172659d2023-04-27 08:51:21 +020029
Gabor Tothee2e7cb2024-10-07 17:02:56 +020030target_include_directories(psats PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
Gabor Toth172659d2023-04-27 08:51:21 +020031
32#-------------------------------------------------------------------------------
33# For user-specific tracing set to TRACE_LEVEL_NONE and implement:
34# void trace_puts(const char *str)
35#-------------------------------------------------------------------------------
36
Gabor Tothee2e7cb2024-10-07 17:02:56 +020037set(TRACE_PREFIX "LIBPSATS" CACHE STRING "Trace prefix")
Gabor Toth172659d2023-04-27 08:51:21 +020038set(TRACE_LEVEL "TRACE_LEVEL_DEBUG" CACHE STRING "Trace level")
39#-------------------------------------------------------------------------------
40# Extend with components that are common across all deployments of
Gabor Tothee2e7cb2024-10-07 17:02:56 +020041# libpsats
Gabor Toth172659d2023-04-27 08:51:21 +020042#
43#-------------------------------------------------------------------------------
Gabor Tothee2e7cb2024-10-07 17:02:56 +020044include(../libpsats.cmake REQUIRED)