X11WindowSystem: Introducing skip of DamageEvents for resized surfaces
[profile/ivi/layer-management.git] / LayerManagerPlugins / Renderers / GraphicLib / LayerManagerGraphicGLESv2 / CMakeLists.txt
1 ############################################################################
2 #
3 # Copyright 2010-2012 BMW Car IT GmbH
4 # Copyright (C) 2011 DENSO CORPORATION and Robert Bosch Car Multimedia Gmbh
5 #
6 #
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
10 #
11 #               http://www.apache.org/licenses/LICENSE-2.0
12 #
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.
18 #
19 ############################################################################
20
21 cmake_minimum_required (VERSION 2.6)
22 project(LayerManagerGraphicGLESv2)
23 project_type(CORE)
24
25 #===========================================================================
26 # configuration
27 #===========================================================================
28 SET(RENDERERBASE_DIR ${CMAKE_SOURCE_DIR}/LayerManagerPlugins/Renderers/Base)
29 SET(GRAPHIC_LIB_DIR ${CMAKE_SOURCE_DIR}/LayerManagerPlugins/Renderers/Graphic)
30
31 #===========================================================================
32 # component
33 #===========================================================================
34 find_package(X11 REQUIRED)
35 find_package(EGL REQUIRED)
36 find_package(GLESv2 REQUIRED)
37 find_package(Threads)
38
39 include_directories(
40     ${GRAPHIC_LIB_DIR}/include
41     ${RENDERERBASE_DIR}/include
42     ${CMAKE_SOURCE_DIR}/config
43     ${CMAKE_SOURCE_DIR}/LayerManagerBase/include
44     ${CMAKE_SOURCE_DIR}/LayerManagerUtils/include
45     ${X11_INCLUDE_DIR}
46     ${EGL_INCLUDE_DIR}
47     ${GLESv2_INCLUDE_DIR}
48 )
49
50 set(SOURCES
51     ${RENDERERBASE_DIR}/src/BaseRenderer.cpp
52     ${GRAPHIC_LIB_DIR}/src/GraphicSystems/GLESGraphicSystem.cpp
53     ${GRAPHIC_LIB_DIR}/src/WindowSystems/BaseWindowSystem.cpp
54     ${GRAPHIC_LIB_DIR}/src/WindowSystems/X11WindowSystem.cpp
55     ${GRAPHIC_LIB_DIR}/src/TextureBinders/X11Copy.cpp
56     ${GRAPHIC_LIB_DIR}/src/TextureBinders/X11CopyGLES.cpp
57     ${GRAPHIC_LIB_DIR}/src/TextureBinders/X11EglImage.cpp
58 )
59
60 set(LIBS
61     LayerManagerUtils
62     LayerManagerBase
63     ${CMAKE_THREAD_LIBS_INIT}
64     ${X11_X11_LIB}
65     ${X11_Xcomposite_LIB}
66     ${X11_Xdamage_LIB}
67     ${X11_Xfixes_LIB}
68     ${EGL_LIBRARY}
69     ${GLESv2_LIBRARIES}
70 )
71
72 add_library(${PROJECT_NAME} STATIC ${SOURCES})
73
74 target_link_libraries(${PROJECT_NAME} ${LIBS})
75
76 add_dependencies(${PROJECT_NAME} ${LIBS})
77
78 #===========================================================================
79 # install
80 #===========================================================================
81 install(TARGETS     ${PROJECT_NAME}
82         DESTINATION lib)
83
84 install(FILES       ${GRAPHIC_LIB_DIR}/include/GraphicSystems/BaseGraphicSystem.h
85                     ${GRAPHIC_LIB_DIR}/include/GraphicSystems/GLESGraphicSystem.h
86         DESTINATION include/layermanager/graphic/GraphicSystems)
87
88 install(FILES       ${GRAPHIC_LIB_DIR}/include/TextureBinders/ITextureBinder.h
89                     ${GRAPHIC_LIB_DIR}/include/TextureBinders/X11Copy.h
90                     ${GRAPHIC_LIB_DIR}/include/TextureBinders/X11CopyGLES.h
91                     ${GRAPHIC_LIB_DIR}/include/TextureBinders/X11EglImage.h
92         DESTINATION include/layermanager/graphic/TextureBinders)
93
94 install(FILES       ${GRAPHIC_LIB_DIR}/include/PlatformSurfaces/XPlatformSurface.h
95                     ${GRAPHIC_LIB_DIR}/include/PlatformSurfaces/EglXPlatformSurface.h
96         DESTINATION include/layermanager/graphic/PlatformSurfaces)
97
98 install(FILES       ${GRAPHIC_LIB_DIR}/include/WindowSystems/BaseWindowSystem.h
99                     ${GRAPHIC_LIB_DIR}/include/WindowSystems/X11WindowSystem.h
100         DESTINATION include/layermanager/graphic/WindowSystems)
101
102 install(FILES       ${RENDERERBASE_DIR}/include/BaseRenderer.h
103                     ${RENDERERBASE_DIR}/include/RenderUtil.h
104         DESTINATION include/layermanager/graphic/Base)