1 ############################################################################
3 # Copyright 2010-2012 BMW Car IT GmbH
4 # Copyright (C) 2011 DENSO CORPORATION and Robert Bosch Car Multimedia Gmbh
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 ############################################################################
21 cmake_minimum_required (VERSION 2.6)
22 project (LayerManager)
24 #==============================================================================
26 #==============================================================================
27 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
28 include(${CMAKE_MODULE_PATH}/DefaultSettings.txt)
29 include(${CMAKE_MODULE_PATH}/CMakeVersions.txt)
30 include(${CMAKE_MODULE_PATH}/CustomMacros.txt)
31 add_subdirectory(cmake/optionalFeatures)
33 #==============================================================================
34 # Platforms / A set of indiviual options at once
35 #==============================================================================
36 option (WITH_X11_GLES "Build for X11 with GLES 2.0" ON )
37 option (WITH_GLESv2_LIB "Build development library for GLES2 Based Renderers" OFF)
38 option (WITH_EGL_EXAMPLE "Build EGL_EXAMPLE / X11" ON )
39 option (WITH_WL_EXAMPLE "Build EGL_EXAMPLE / Wayland" OFF)
40 option (WITH_DESKTOP "Build for Desktop / GLX" OFF)
41 option (WITH_GLX_LIB "Build development library for GLX Based Renderers" OFF)
42 option (WITH_GLX_EXAMPLE "Build GLX_EXAMPLE " OFF)
43 option (WITH_FORCE_COPY "Force Software Copy of Pixmaps" OFF)
44 option (WITH_CLIENTEXAMPLES "Build client examples " ON )
45 option (WITH_TESTS "Build Available Tests " OFF)
46 option (WITH_DLT "Build with DLT support " OFF)
47 option (WITH_WAYLAND_FBDEV "Build Wayland with FBDEV backend" OFF)
48 option (WITH_WAYLAND_FBDEV_LIB "Build development library for Wayland FBDEV Based Renderers" OFF)
49 option (WITH_WAYLAND_X11 "Build Wayland with X11 backend" OFF)
50 option (WITH_WAYLAND_X11_LIB "Build development library for Wayland X11 Based Renderers" OFF)
51 option (WITH_WAYLAND_DRM "Build Wayland with drm backend" OFF)
52 option (WITH_WAYLAND_DRM_LIB "Build development library for Wayland DRM Based Renderers" OFF)
53 option (WITH_SERVICE_BIN "Build LayerManagerService Binary" ON)
54 option (WITH_CONTROL_BIN "Build LayerManagerControl Binary" ON)
55 option (WITH_CLIENT_LIB "Build LayerManagement Client Lib" ON)
56 option (WITH_GENERIC_COMMUNICATOR "Build Generic Communicator Plugin" ON)
57 option (WITH_SYSTEMD_HEALTH_MONITOR "Build plugin for systemd health monitoring" OFF)
58 option (WITH_EXAMPLE_SCENE_PROVIDER "Build scene provider plugin for examples" OFF)
59 option (WITH_STATIC_LIBRARIES "Link all libraries statically" OFF)
60 option (WITH_TEXT_RENDERER "Build text renderer (only logging)" OFF)
62 #==============================================================================
63 # enable ctest if building with tests
64 # run 'make test' after build to run all tests
65 # be aware that some tests require a running layermanager
66 #==============================================================================
69 add_subdirectory_once (3rdParty/gtest)
70 add_subdirectory_once (3rdParty/gmock)
74 add_subdirectory_once (LayerManagerUtils)
75 add_subdirectory_once (LayerManagerClient/ilmClient)
76 add_subdirectory_once (LayerManagerExamples/EGLX11ApplicationExample)
77 add_subdirectory_once (LayerManagerExamples/EGLX11MockNavigation)
78 endif(WITH_EGL_EXAMPLE)
81 add_subdirectory_once (LayerManagerUtils)
82 add_subdirectory_once (LayerManagerClient/ilmClient)
83 add_subdirectory_once (LayerManagerExamples/GLXApplicationExample)
84 endif(WITH_GLX_EXAMPLE)
86 if (WITH_CLIENTEXAMPLES)
87 add_subdirectory_once (LayerManagerUtils)
88 add_subdirectory_once (LayerManagerClient/ilmClient)
89 add_subdirectory_once (LayerManagerExamples/LayerManagerClientExample)
90 endif(WITH_CLIENTEXAMPLES)
93 add_subdirectory_once (LayerManagerUtils)
94 add_subdirectory_once (LayerManagerClient/ilmClient)
95 add_subdirectory_once (LayerManagerExamples/EGLWLApplicationExample)
96 add_subdirectory_once (LayerManagerExamples/EGLWLMockNavigation)
97 add_subdirectory_once (LayerManagerExamples/WLChromakeyExample)
98 add_subdirectory_once (LayerManagerExamples/EGLWLInputEventExample)
99 endif(WITH_WL_EXAMPLE)
101 if (WITH_CONTROL_BIN)
102 add_subdirectory_once (LayerManagerUtils)
103 add_subdirectory_once (LayerManagerClient/ilmClient)
104 add_subdirectory_once (LayerManagerControl)
105 endif(WITH_CONTROL_BIN)
107 if (WITH_EXAMPLE_SCENE_PROVIDER)
108 add_subdirectory_once (LayerManagerCommands)
109 add_subdirectory_once (LayerManagerBase)
110 add_subdirectory_once (LayerManagerPlugins/SceneProvider/ExampleSceneProvider)
111 endif(WITH_EXAMPLE_SCENE_PROVIDER)
113 if (WITH_SYSTEMD_HEALTH_MONITOR)
114 add_subdirectory_once (3rdParty/systemd)
115 add_subdirectory_once (LayerManagerUtils)
116 add_subdirectory_once (LayerManagerBase)
117 add_subdirectory_once (LayerManagerPlugins/HealthMonitor/SystemdHealthMonitor)
118 endif(WITH_SYSTEMD_HEALTH_MONITOR)
120 if (WITH_GENERIC_COMMUNICATOR)
121 add_subdirectory_once (LayerManagerPlugins/IpcModules)
122 add_subdirectory_once (LayerManagerCommands)
123 add_subdirectory_once (LayerManagerPlugins/Communicators/GenericCommunicator)
124 endif(WITH_GENERIC_COMMUNICATOR)
127 add_subdirectory_once (LayerManagerPlugins/Renderers/GraphicLib/LayerManagerGraphicGLX)
128 add_subdirectory_once (LayerManagerPlugins/Renderers/Platform/GLXRenderer)
132 add_subdirectory_once (LayerManagerPlugins/Renderers/GraphicLib/LayerManagerGraphicGLX)
135 if (WITH_WAYLAND_X11)
136 add_subdirectory_once (LayerManagerUtils)
137 add_subdirectory_once (LayerManagerBase)
138 add_subdirectory_once (LayerManagerPlugins/Renderers/GraphicLib/LayerManagerGraphicWaylandX11GLESv2)
139 add_subdirectory_once (LayerManagerPlugins/Renderers/Platform/WaylandGLESRenderer)
140 add_subdirectory_once (LayerManagerPlugins/Renderers/Platform/WaylandX11GLESRenderer)
141 endif(WITH_WAYLAND_X11)
143 if (WITH_WAYLAND_X11_LIB)
144 add_subdirectory_once (LayerManagerPlugins/Renderers/GraphicLib/LayerManagerGraphicWaylandX11GLESv2)
145 endif(WITH_WAYLAND_X11_LIB)
147 if (WITH_WAYLAND_DRM)
148 add_subdirectory_once (LayerManagerUtils)
149 add_subdirectory_once (LayerManagerBase)
150 add_subdirectory_once (LayerManagerPlugins/Renderers/GraphicLib/LayerManagerGraphicWaylandDrmGLESv2)
151 add_subdirectory_once (LayerManagerPlugins/Renderers/Platform/WaylandGLESRenderer)
152 add_subdirectory_once (LayerManagerPlugins/Renderers/Platform/WaylandDrmGLESRenderer)
153 endif(WITH_WAYLAND_DRM)
155 if (WITH_WAYLAND_DRM_LIB)
156 add_subdirectory_once (LayerManagerPlugins/Renderers/GraphicLib/LayerManagerGraphicWaylandDrmGLESv2)
157 endif(WITH_WAYLAND_DRM_LIB)
159 if (WITH_WAYLAND_FBDEV)
160 add_subdirectory_once (LayerManagerUtils)
161 add_subdirectory_once (LayerManagerBase)
162 add_subdirectory_once (LayerManagerPlugins/Renderers/GraphicLib/LayerManagerGraphicWaylandFbdevGLESv2)
163 add_subdirectory_once (LayerManagerPlugins/Renderers/Platform/WaylandGLESRenderer)
164 add_subdirectory_once (LayerManagerPlugins/Renderers/Platform/WaylandFbdevGLESRenderer)
165 endif(WITH_WAYLAND_FBDEV)
167 if (WITH_WAYLAND_FBDEV_LIB)
168 add_subdirectory_once (LayerManagerPlugins/Renderers/GraphicLib/LayerManagerGraphicWaylandFbdevGLESv2)
169 endif(WITH_WAYLAND_FBDEV_LIB)
172 add_subdirectory_once (LayerManagerPlugins/Renderers/GraphicLib/LayerManagerGraphicGLESv2)
173 add_subdirectory_once (LayerManagerPlugins/Renderers/Platform/X11GLESRenderer)
177 add_subdirectory_once (LayerManagerPlugins/Renderers/GraphicLib/LayerManagerGraphicGLESv2)
178 endif(WITH_GLESv2_LIB)
180 if (WITH_TEXT_RENDERER)
181 add_subdirectory_once (LayerManagerPlugins/Renderers/Platform/TextRenderer)
182 endif(WITH_TEXT_RENDERER)
184 if (WITH_SERVICE_BIN)
185 add_subdirectory_once (LayerManagerUtils)
186 add_subdirectory_once (LayerManagerBase)
187 add_subdirectory_once (LayerManagerService)
188 endif (WITH_SERVICE_BIN)
191 add_subdirectory_once (LayerManagerPlugins/IpcModules)
192 add_subdirectory_once (LayerManagerClient/ilmClient)
193 endif (WITH_CLIENT_LIB)
195 #==============================================================================
196 # store used build configuration
197 #==============================================================================
198 add_subdirectory_once(config)