summaryrefslogtreecommitdiff
path: root/source/hal/source/components/vsi/CMakeLists.txt
blob: 8d07459af6359b09007d96c4e08ccb86e9d91728 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#----------------------------------------------------------------------------
#  SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
#  SPDX-License-Identifier: Apache-2.0
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#----------------------------------------------------------------------------

##########################################################
# Arm Virtual Streaming Interface initialization library #
##########################################################

# Arm Virtual Streaming Interface is only available on
# certain supported platforms.

cmake_minimum_required(VERSION 3.21.0)
set(ARM_VSI_COMPONENT arm_vsi)
project(${ARM_VSI_COMPONENT}
    DESCRIPTION     "Arm Virtual Streaming Interface initialization library"
    LANGUAGES       C CXX ASM)

## Logging utilities:
if (NOT TARGET log)
    if (NOT DEFINED LOG_PROJECT_DIR)
        message(FATAL_ERROR "LOG_PROJECT_DIR needs to be defined.")
    endif()
    add_subdirectory(${LOG_PROJECT_DIR} ${CMAKE_BINARY_DIR}/log)
endif()

# Create static library
add_library(${ARM_VSI_COMPONENT} STATIC)

## Include directories - public
target_include_directories(${ARM_VSI_COMPONENT}
    PUBLIC
    include)

## Component sources
target_sources(${ARM_VSI_COMPONENT}
    PUBLIC
    source/video_drv.c)

## If the rte_components target has been defined, include it as a dependency here. This component
## gives access to certain CPU related functions and definitions that should come from the CMSIS
## or custom system setup and boot implementation files.
## If the component is not defined as a target, a dependency for this target should be added by
## the project importing this one.
if (TARGET rte_components)
    target_link_libraries(${ARM_VSI_COMPONENT} PUBLIC
            rte_components)
else()
    message(WARNING
            "rte_components target not defined."
            "${ARM_VSI_COMPONENT} will need to be provided access to"
            "RTE_Components.h header to include CPU specific definitions.")
endif()
## Compile definitions
target_compile_definitions(${ARM_VSI_COMPONENT}
    PUBLIC
    VSI_ENABLED)

## Add dependencies
target_link_libraries(${ARM_VSI_COMPONENT} PUBLIC
    log)

# Display status
message(STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR})
message(STATUS "*******************************************************")
message(STATUS "Library                                : " ${ARM_VSI_COMPONENT})
message(STATUS "*******************************************************")