-
Notifications
You must be signed in to change notification settings - Fork 25
/
CMakeLists.txt
57 lines (43 loc) · 1.08 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
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 3.10)
project(GenAVB/TSN)
set(TOPDIR ${CMAKE_CURRENT_SOURCE_DIR})
set(VERSION_FILE common/version.h)
add_custom_target(stack)
if(NOT DEFINED TARGET)
message(FATAL_ERROR "Target not defined")
endif()
message(STATUS "TARGET: ${TARGET}")
set(target_file "${CMAKE_CURRENT_SOURCE_DIR}/config_${TARGET}.cmake")
if(NOT EXISTS ${target_file})
message(FATAL_ERROR "cannot find ${target_file}")
endif()
set(CMAKE_INSTALL_MESSAGE LAZY)
# If not explicetly defined, set install prefix to build directory
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/target"
CACHE PATH "default install path" FORCE)
endif()
include(configs/configs.cmake)
include(${target_file})
include(extensions.cmake)
list(APPEND maindirs
${TARGET_OS}
management
gptp
srp
maap
hsr
avtp
avdecc
api
public
common
)
foreach(dir ${maindirs})
include(${dir}/${dir}.cmake)
endforeach()
include(CMakeLists.${TARGET_OS})
include(doc/CMakeLists.txt)
genavb_generate_version()
genavb_generate_archives()
genavb_install()