forked from raspberrypi/userland
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
116 lines (90 loc) · 3.24 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
cmake_minimum_required(VERSION 2.8)
project(vmcs_host_apps)
set(BUILD_MMAL TRUE)
if (ALL_APPS)
set(BUILD_MMAL_APPS TRUE)
else()
set(BUILD_MMAL_APPS FALSE)
endif()
set(vmcs_root ${PROJECT_SOURCE_DIR})
get_filename_component(VIDEOCORE_ROOT . ABSOLUTE)
set(VCOS_PTHREADS_BUILD_SHARED TRUE)
include(makefiles/cmake/global_settings.cmake)
include(makefiles/cmake/arm-linux.cmake)
include(makefiles/cmake/vmcs.cmake)
# Global include paths
include_directories(host_applications/framework)
include_directories(${PROJECT_SOURCE_DIR})
include_directories(interface/vcos/pthreads)
include_directories(interface/vmcs_host/linux)
include_directories(interface/vmcs_host)
include_directories(interface/vmcs_host/khronos)
include_directories(interface/khronos/include)
include_directories(${PROJECT_BINARY_DIR})
include_directories(interface/vchiq_arm)
#include_directories(tools/inet_transport)
include_directories(host_support/include)
# Global compiler flags
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar -Wall -Wno-unused-but-set-variable")
endif()
add_definitions(-D_REENTRANT)
add_definitions(-DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1)
add_definitions(-DOMX_SKIP64BIT)
add_definitions(-DEGL_SERVER_DISPMANX)
add_definitions(-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE)
# do we actually need this?
add_definitions(-D__VIDEOCORE4__)
add_definitions(-DTV_SUPPORTED_MODE_NO_DEPRECATED)
# add_definitions(-DKHRONOS_CLIENT_LOGGING)
# Check for OpenWF-C value set via command line
if(KHRONOS_EGL_PLATFORM MATCHES "openwfc")
add_definitions(-DKHRONOS_EGL_PLATFORM_OPENWFC)
endif()
# List of subsidiary CMakeLists
add_subdirectory(interface/vcos)
add_subdirectory(interface/vmcs_host)
add_subdirectory(interface/vchiq_arm)
add_subdirectory(interface/khronos)
#add_subdirectory(opensrc/tools/lua)
if(BUILD_MMAL)
include_directories(interface/mmal)
add_subdirectory(interface/mmal)
endif()
if(BUILD_MMAL_APPS)
add_subdirectory(containers)
endif()
add_subdirectory(middleware/openmaxil)
# 3d demo code
#if(NOT ANDROID)
# add_subdirectory(thirdparty/applications/demos)
# add_subdirectory(opensrc/applications/demos)
#endif()
#if(ENABLE_3D_TESTS)
# add_subdirectory(thirdparty/applications/test)
#endif()
# FIXME: this directory needs a more sensible name and better
# platform factoring
add_subdirectory(interface/usbdk)
# FIXME: we should use a pre-packaged version of freetype
# rather than the one included in the repo.
#add_subdirectory(opensrc/helpers/freetype)
#add_subdirectory(${PROJECT_SOURCE_DIR}/opensrc/helpers/fonts/ttf-bitstream-vera)
# VMCS Host Applications
#add_subdirectory(host_applications/framework)
if(BUILD_MMAL_APPS)
add_subdirectory(host_applications/vmcs)
endif()
# add_subdirectory(interface/vchiq/test/win32)
# Apps and libraries supporting Camera Tuning Tool
#add_subdirectory(tools/inet_transport/linux)
#add_subdirectory(host_support/vcstandalone)
# add linux apps
add_subdirectory(host_applications/linux)
# Debug sym for mmal-vc-diag and vcdbg
#add_subdirectory(host_applications/linux/libs/debug_sym)
set(vmcs_host_apps_VERSION_MAJOR 1)
set(vmcs_host_apps_VERSION_MINOR 0)
include_directories("${PROJECT_BINARY_DIR}")
# Remove cache entry, if one added by command line
unset(KHRONOS_EGL_PLATFORM CACHE)