1 ############################################################################
3 # Copyright (C) 2012 Bayerische Motorenwerke Aktiengesellschaft
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 ############################################################################
20 # This is an example toolchain file, please adapt for your needs
21 # To use that file please call
22 # cmake <LayerManager_Source_Dir> -DCMAKE_TOOLCHAIN_FILE=<LayerManager_Source_Dir>/toolchain.cmake
26 ################################################################################
28 # Layer Manager Configuration #
30 ################################################################################
32 # update these settings as required by your target
34 # Build examples for client library usage
35 set (WITH_CLIENTEXAMPLES ON CACHE BOOL "" FORCE)
37 # Build LayerManagement client library
38 set (WITH_CLIENT_LIB ON CACHE BOOL "" FORCE)
40 # Build renderer plugin for OpenGL/X11 based platforms
41 set (WITH_DESKTOP OFF CACHE BOOL "" FORCE)
43 # Build LayerManagerControl binary
44 set (WITH_CONTROL_BIN ON CACHE BOOL "" FORCE)
46 # Build LayerManagement control library
47 set (WITH_CONTROL_LIB OFF CACHE BOOL "" FORCE)
49 # Build with DLT logging support
50 set (WITH_DLT OFF CACHE BOOL "" FORCE)
52 # Generate documentation during build (requires doxygen)
53 set (WITH_DOCUMENTATION OFF CACHE BOOL "" FORCE)
55 # Build examples for GLES/X11 based platforms
56 set (WITH_EGL_EXAMPLE ON CACHE BOOL "" FORCE)
58 # Build scene provider plugin to run example applications
59 set (WITH_EXAMPLE_SCENE_PROVIDER OFF CACHE BOOL "" FORCE)
61 # Force Software Copy of Pixmaps (compatibility for VMs)
62 set (WITH_FORCE_COPY OFF CACHE BOOL "" FORCE)
64 # Build Generic Communicator Plugin based on IpcModules
65 set (WITH_GENERIC_COMMUNICATOR ON CACHE BOOL "" FORCE)
67 # Build development library for GLES/X11 based renderers
68 set (WITH_GLESv2_LIB OFF CACHE BOOL "" FORCE)
70 # Build examples for OpenGL/X11 based platforms
71 set (WITH_GLX_EXAMPLE OFF CACHE BOOL "" FORCE)
73 # Build development library for OpenGL/X11 based renderers
74 set (WITH_GLX_LIB OFF CACHE BOOL "" FORCE)
76 # Build with TCP Ipc Module
77 set (WITH_IPC_MODULE_TCP OFF CACHE BOOL "" FORCE)
79 # Build with D-Bus Ipc Module
80 set (WITH_IPC_MODULE_DBUS ON CACHE BOOL "" FORCE)
82 # Build LayerManagerService binary
83 set (WITH_SERVICE_BIN ON CACHE BOOL "" FORCE)
85 # Link all plugins and libraries statically
86 set (WITH_STATIC_LIBRARIES OFF CACHE BOOL "" FORCE)
88 # Report styleguide problems during build (requires python)
89 set (WITH_STYLE_CHECKING OFF CACHE BOOL "" FORCE)
91 # Build plugin for systemd based health monitoring
92 set (WITH_SYSTEMD_HEALTH_MONITOR OFF CACHE BOOL "" FORCE)
94 # Build unit test binaries for all enabled components
95 set (WITH_TESTS OFF CACHE BOOL "" FORCE)
97 # Build renderer plugin with pure logging (no rendering)
98 set (WITH_TEXT_RENDERER OFF CACHE BOOL "" FORCE)
100 # Build renderer plugin for GLES/Wayland with X11 backend
101 set (WITH_WAYLAND_X11 OFF CACHE BOOL "" FORCE)
103 # Build development library for GLES/Wayland X11 based renderers
104 set (WITH_WAYLAND_X11_LIB OFF CACHE BOOL "" FORCE)
106 # Build renderer plugin for GLES/Wayland with DRM backend
107 set (WITH_WAYLAND_DRM OFF CACHE BOOL "" FORCE)
109 # Build development library for GLES/Wayland DRM based renderers
110 set (WITH_WAYLAND_DRM_LIB OFF CACHE BOOL "" FORCE)
112 # Build renderer plugin for GLES/Wayland with FBDEV backend
113 set (WITH_WAYLAND_FBDEV OFF CACHE BOOL "" FORCE)
115 # Build development library for GLES/Wayland FBDEV based renderers
116 set (WITH_WAYLAND_FBDEV_LIB OFF CACHE BOOL "" FORCE)
118 # Build examples for GLES/Wayland based platforms
119 set (WITH_WL_EXAMPLE OFF CACHE BOOL "" FORCE)
121 # Build renderer plugin for GLES/X11 based platforms
122 set (WITH_X11_GLES ON CACHE BOOL "" FORCE)
126 ################################################################################
128 # Cross Compilation #
130 ################################################################################
134 # This present the minimal variables to be set for cross compilation.
135 # See http://www.cmake.org/Wiki/CMake_Cross_Compiling for more details.
138 # Set the target system type, typically Linux
139 set (CMAKE_SYSTEM_NAME Linux)
140 # Set the C compiler to use
141 set (CMAKE_C_COMPILER arm-linux-gnueabi-gcc)
142 # Set the C++ compiler to use
143 set (CMAKE_CXX_COMPILER arm-linux-gnueabi-g++)
144 # Indicate where is located your sysroot. Can be a list of directories
145 set (CMAKE_FIND_ROOT_PATH /opt/sysroot/armv7-linux-gnueabi)
147 # search for programs on the host
148 set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
149 # search for headers & libraries on the target
150 set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
151 set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)