-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
45 lines (35 loc) · 1.32 KB
/
CMakeLists.txt
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
# SPDX-FileCopyrightText: Copyright (c) 2024 Intel Corporation
#
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
# MCM - Media Communications Mesh
project(MCM)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "-std=c++20 -lstdc++fs")
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
# Disable RPATH
set(CMAKE_SKIP_RPATH TRUE)
# setup components folders
set(MCM_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(MP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/media-proxy)
set(MP_TESTS_DIR ${MP_DIR}/tests)
set(SDK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sdk)
set(TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests/unit)
set(SDK_INCLUDE_DIR ${SDK_DIR}/include)
# Setup output folder
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
add_subdirectory(${SDK_DIR})
add_subdirectory(${MP_DIR})
option(BUILD_UNIT_TESTS "Build and enable unit tests" ON)
if (BUILD_UNIT_TESTS)
enable_testing()
add_subdirectory(${TESTS_DIR})
add_subdirectory(${MP_TESTS_DIR})
endif()
target_include_directories(media_proxy_lib PUBLIC ${SDK_INCLUDE_DIR})
target_link_libraries(media_proxy_lib PUBLIC mcm_dp)