a2be736c9583dd8b3409ce982eb2321803e80e4d
[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     ${EGL_LIBRARY}
68     ${GLESv2_LIBRARIES}
69 )
70
71 add_library(${PROJECT_NAME} STATIC ${SOURCES})
72
73 target_link_libraries(${PROJECT_NAME} ${LIBS})
74
75 add_dependencies(${PROJECT_NAME} ${LIBS})
76
77 #===========================================================================
78 # install
79 #===========================================================================
80 install(TARGETS     ${PROJECT_NAME}
81         DESTINATION lib)
82
83 install(FILES       ${GRAPHIC_LIB_DIR}/include/GraphicSystems/BaseGraphicSystem.h
84                     ${GRAPHIC_LIB_DIR}/include/GraphicSystems/GLESGraphicSystem.h
85         DESTINATION include/layermanager/graphic/GraphicSystems)
86
87 install(FILES       ${GRAPHIC_LIB_DIR}/include/TextureBinders/ITextureBinder.h
88                     ${GRAPHIC_LIB_DIR}/include/TextureBinders/X11Copy.h
89                     ${GRAPHIC_LIB_DIR}/include/TextureBinders/X11CopyGLES.h
90                     ${GRAPHIC_LIB_DIR}/include/TextureBinders/X11EglImage.h
91         DESTINATION include/layermanager/graphic/TextureBinders)
92
93 install(FILES       ${GRAPHIC_LIB_DIR}/include/PlatformSurfaces/XPlatformSurface.h
94                     ${GRAPHIC_LIB_DIR}/include/PlatformSurfaces/EglXPlatformSurface.h
95         DESTINATION include/layermanager/graphic/PlatformSurfaces)
96
97 install(FILES       ${GRAPHIC_LIB_DIR}/include/WindowSystems/BaseWindowSystem.h
98                     ${GRAPHIC_LIB_DIR}/include/WindowSystems/X11WindowSystem.h
99         DESTINATION include/layermanager/graphic/WindowSystems)
100
101 install(FILES       ${RENDERERBASE_DIR}/include/BaseRenderer.h
102                     ${RENDERERBASE_DIR}/include/RenderUtil.h
103         DESTINATION include/layermanager/graphic/Base)