efead222c92b5ff23118c25bc53114ce16e0eada
[profile/ivi/layer-management.git] / LayerManagerPlugins / Renderers / GraphicLib / LayerManagerGraphicGLX / 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(LayerManagerGraphicGLX)
23 project_type(PLUGIN)
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(GLX REQUIRED)
36 find_package(Threads)
37
38 include_directories(
39     ${GRAPHIC_LIB_DIR}/include
40     ${RENDERERBASE_DIR}/include
41     ${CMAKE_SOURCE_DIR}/config
42     ${CMAKE_SOURCE_DIR}/LayerManagerBase/include
43     ${CMAKE_SOURCE_DIR}/LayerManagerUtils/include
44     ${X11_INCLUDE_DIR}
45     ${GLX_INCLUDE_DIR}
46 )
47
48 set(SOURCES
49     ${RENDERERBASE_DIR}/src/BaseRenderer.cpp
50     ${GRAPHIC_LIB_DIR}/src/GraphicSystems/GLXGraphicSystem.cpp
51     ${GRAPHIC_LIB_DIR}/src/WindowSystems/BaseWindowSystem.cpp
52     ${GRAPHIC_LIB_DIR}/src/WindowSystems/X11WindowSystem.cpp
53     ${GRAPHIC_LIB_DIR}/src/TextureBinders/X11TextureFromPixmap.cpp
54     ${GRAPHIC_LIB_DIR}/src/TextureBinders/X11CopyGLX.cpp
55     ${GRAPHIC_LIB_DIR}/src/TextureBinders/X11Copy.cpp
56 )
57
58 set(LIBS
59     ${CMAKE_THREAD_LIBS_INIT}
60     ${X11_X11_LIB}
61     ${X11_Xcomposite_LIB}
62     ${X11_Xdamage_LIB}
63     ${GLX_LIBRARIES}
64     LayerManagerUtils
65     LayerManagerBase
66 )
67
68 add_library(${PROJECT_NAME} STATIC ${SOURCES})
69
70 target_link_libraries(${PROJECT_NAME} ${LIBS})
71
72 add_dependencies(${PROJECT_NAME} ${LIBS})
73
74 #===========================================================================
75 # install
76 #===========================================================================
77 install(TARGETS     ${PROJECT_NAME}
78         DESTINATION lib)
79
80 install(FILES       ${GRAPHIC_LIB_DIR}/include/GraphicSystems/BaseGraphicSystem.h
81                     ${GRAPHIC_LIB_DIR}/include/GraphicSystems/GLXGraphicsystem.h
82         DESTINATION include/layermanager/graphic/GraphicSystems)
83
84 install(FILES       ${GRAPHIC_LIB_DIR}/include/TextureBinders/ITextureBinder.h
85                     ${GRAPHIC_LIB_DIR}/include/TextureBinders/X11Copy.h
86                     ${GRAPHIC_LIB_DIR}/include/TextureBinders/X11CopyGLX.h
87                     ${GRAPHIC_LIB_DIR}/include/TextureBinders/X11TextureFromPixmap.h
88         DESTINATION include/layermanager/graphic/TextureBinders)
89
90 install(FILES       ${GRAPHIC_LIB_DIR}/include/PlatformSurfaces/XPlatformSurface.h
91                     ${GRAPHIC_LIB_DIR}/include/PlatformSurfaces/GLXPlatformSurface.h
92         DESTINATION include/layermanager/graphic/PlatformSurfaces)
93
94 install(FILES       ${GRAPHIC_LIB_DIR}/include/WindowSystems/BaseWindowSystem.h
95                     ${GRAPHIC_LIB_DIR}/include/WindowSystems/X11WindowSystem.h
96         DESTINATION include/layermanager/graphic/WindowSystems)
97
98 install(FILES       ${RENDERERBASE_DIR}/include/BaseRenderer.h
99                     ${RENDERERBASE_DIR}/include/RenderUtil.h
100         DESTINATION include/layermanager/graphic/Base)
101