1 ############################################################################
3 # Copyright 2010, 2011 BMW Car IT GmbH
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 ############################################################################
20 cmake_minimum_required (VERSION 2.6)
21 project (LayerManager)
23 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
25 SET( ${PROJECT_NAME}_MAJOR_VERSION 0 )
26 SET( ${PROJECT_NAME}_MINOR_VERSION 9 )
27 SET( ${PROJECT_NAME}_PATCH_LEVEL 1 )
28 set(VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL})
30 set(LICENSE "APACHE 2.0")
32 set(GENIVI_PROJECT_VERSION ${VERSION})
35 ##################### RPM CONFIG ########################
36 set(GENIVI_RPM_RELEASE "1${SVN_REVISION}")
38 #########################################################
41 # Platforms / A set of indiviual options at once
42 # Choose only ONE of these!!
45 "Build for X11 with GLES 2.0" ON)
48 "Build for Desktop / GLX" OFF)
50 option (WITH_CLIENTEXAMPLES
51 "Build client examples " ON)
54 option (WITH_EGL_EXAMPLE
55 "Build EGL_EXAMPLE " ON)
57 option (WITH_GLX_EXAMPLE
58 "Build GLX_EXAMPLE " OFF)
61 "Build Available Tests " OFF)
64 "Build with usage of X11 Threading" ON)
67 "Build development library for GLX Based Renderers" OFF)
69 option (WITH_GLESv2_LIB
70 "Build development library for GLES2 Based Renderers" OFF)
72 option (WITH_INPUT_EVENTS
73 "Activate input events handling" OFF)
75 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
77 option (WITH_FORCE_COPY
78 "Force Software Copy of Pixmaps" OFF)
81 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_XTHREADS" CACHE STRING "" FORCE)
84 if (WITH_INPUT_EVENTS)
85 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_INPUT_EVENTS" CACHE STRING "" FORCE)
86 endif(WITH_INPUT_EVENTS)
90 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLX_GRAPHICSYSTEM_FORCE_COPY -DGLES_FORCE_COPY" CACHE STRING "" FORCE)
91 endif(WITH_FORCE_COPY)
93 include_directories ("${PROJECT_SOURCE_DIR}/3rdParty/")
94 add_subdirectory (3rdParty)
96 add_subdirectory (LayerManagerPlugins/Communicators/DBUSCommunicator)
97 add_subdirectory (LayerManagerClient/ilmClient)
98 add_subdirectory (LayerManagerUtils)
99 add_subdirectory (LayerManagerCommands)
100 add_subdirectory (LayerManagerService)
103 set (WITH_GLX_LIB ON CACHE STRING "" FORCE)
107 set (WITH_GLESv2_LIB ON CACHE STRING "" FORCE)
109 if (WITH_GLESv2_LIB OR WITH_GLX_LIB )
110 add_subdirectory (LayerManagerPlugins/Renderers/Graphic)
111 endif(WITH_GLESv2_LIB OR WITH_GLX_LIB)
114 add_subdirectory (LayerManagerPlugins/Renderers/Platform/GLXRenderer)
118 add_subdirectory (LayerManagerPlugins/Renderers/Platform/X11GLESRenderer)
121 if (WITH_EGL_EXAMPLE)
122 add_subdirectory (LayerManagerExamples/EGLX11ApplicationExample)
123 endif(WITH_EGL_EXAMPLE)
125 if (WITH_GLX_EXAMPLE)
126 add_subdirectory (LayerManagerExamples/GLXApplicationExample)
127 endif(WITH_GLX_EXAMPLE)
129 if (WITH_CLIENTEXAMPLES)
130 add_subdirectory (LayerManagerExamples/LayerManagerClientExample)
131 add_subdirectory (LayerManagerExamples/LayerManagerToolBox)
132 add_subdirectory (LayerManagerExamples/LayerSceneDescriptionExample)
133 endif(WITH_CLIENTEXAMPLES)
135 # enable ctest if building with tests
136 # run 'make test' after build to run all tests
137 # be aware that some tests require a running layermanager