558d66c12449b28462705acb50c347550e8a070a
[profile/ivi/layer-management.git] / CMakeLists.txt
1 ############################################################################
2
3 # Copyright 2010, 2011 BMW Car IT GmbH  
4
5
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 
9 #
10 #       http://www.apache.org/licenses/LICENSE-2.0 
11 #
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.
17 #
18 ############################################################################
19
20 cmake_minimum_required (VERSION 2.6)
21 project (LayerManager)
22
23 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
24
25 SET( ${PROJECT_NAME}_MAJOR_VERSION 0 )
26 SET( ${PROJECT_NAME}_MINOR_VERSION 8 )
27 SET( ${PROJECT_NAME}_PATCH_LEVEL 1 )
28 set(VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL})
29
30 set(LICENSE "APACHE 2.0")
31
32 set(GENIVI_PROJECT_VERSION ${VERSION})
33
34
35 ##################### RPM CONFIG ########################
36 set(GENIVI_RPM_RELEASE "1${SVN_REVISION}")
37 set(SPEC_DIR ".")
38 #########################################################
39
40
41 # Platforms / A set of indiviual options at once
42 # Choose only ONE of these!!
43
44 option (WITH_X11_GLES 
45         "Build for X11 with GLES 2.0" ON)   
46                
47 option (WITH_DESKTOP 
48         "Build for Desktop / GLX" OFF)
49
50 option (WITH_EGL_EXAMPLE 
51         "Build EGL_EXAMPLE " ON)
52
53 option (WITH_GLX_EXAMPLE 
54         "Build GLX_EXAMPLE " OFF)
55         
56 option (WITH_TESTS
57         "Build Available Tests " OFF)
58         
59 option (WITH_XTHREADS
60         "Build with usage of X11 Threading" ON)
61
62 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
63
64 option (WITH_FORCE_COPY 
65         "Force Software Copy of Pixmaps" OFF)
66         
67 if (WITH_XTHREADS)
68 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_XTHREADS" CACHE STRING "" FORCE)
69 endif(WITH_XTHREADS)
70         
71 if (WITH_FORCE_COPY)
72 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLX_GRAPHICSYSTEM_FORCE_COPY -DGLES_FORCE_COPY" CACHE STRING "" FORCE)
73 endif(WITH_FORCE_COPY)
74
75 add_subdirectory (LayerManagerPlugins/Communicators/DBUSCommunicator)
76 add_subdirectory (LayerManagerClient/ilmClient)
77 add_subdirectory (LayerManagerUtils)
78 add_subdirectory (LayerManagerCommands)
79 add_subdirectory (LayerManagerService)
80 add_subdirectory (LayerManagerExamples/LayerManagerClientExample)
81
82     
83 if (WITH_DESKTOP)
84     add_subdirectory (LayerManagerPlugins/Renderers/Platform/GLXRenderer)
85 endif(WITH_DESKTOP)     
86
87 if (WITH_X11_GLES)
88     add_subdirectory (LayerManagerPlugins/Renderers/Platform/X11GLESRenderer)
89 endif(WITH_X11_GLES)   
90
91 if (WITH_EGL_EXAMPLE)
92     add_subdirectory (LayerManagerExamples/EGLX11ApplicationExample)
93 endif(WITH_EGL_EXAMPLE)
94
95 if (WITH_GLX_EXAMPLE)
96     add_subdirectory (LayerManagerExamples/GLXApplicationExample)
97 endif(WITH_GLX_EXAMPLE)
98
99