WindowSystem: Don't composite for every redraw request
[profile/ivi/layer-management.git] / LayerManagerService / 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
22 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xlinker -export-dynamic")
23 if (WITH_DLT)
24 find_package(AutomotiveDlt REQUIRED)
25 include_directories(${DLT_INCLUDE_DIR})
26 endif (WITH_DLT)
27
28 include_directories ("include")
29 include_directories ("${PROJECT_SOURCE_DIR}/config")
30 include_directories ("${PROJECT_SOURCE_DIR}/LayerManagerUtils/include")
31 include_directories ("${PROJECT_SOURCE_DIR}/LayerManagerCommands/include")
32
33 link_directories ("${PROJECT_SOURCE_DIR}/LayerManagerUtils/bin")
34 link_directories ("${PROJECT_SOURCE_DIR}/LayerManagerCommands")
35
36 file(GLOB LM_SOURCES src/*.cpp src/shader/*.cpp)
37 file(GLOB LM_INCLUDES include/*.h)
38
39 add_executable(LayerManagerService ${LM_SOURCES} ${LM_INCLUDES} ${PROJECT_SOURCE_DIR}/config/config.h)
40
41 add_dependencies(LayerManagerService LayerManagerUtils)
42 add_dependencies(LayerManagerService LayerManagerCommands)
43
44
45 find_package (Threads)
46 set(LIBS ${LIBS}
47          LayerManagerUtils 
48          LayerManagerCommands
49          dl
50          ${CMAKE_THREAD_LIBS_INIT}
51          ${DLT_LIBRARY}) 
52
53 target_link_libraries(LayerManagerService ${LIBS})
54
55 install (TARGETS LayerManagerService DESTINATION bin)
56 install (FILES ${LM_INCLUDES} DESTINATION include/layermanager)
57
58
59 if (WITH_TESTS)
60 enable_testing()
61
62 add_executable(LayerManagerService_Test
63     tests/SceneTest.cpp
64     tests/LayermanagerTest.cpp
65     tests/GraphicalObjectTest.cpp
66     tests/GraphicalGroupTest.cpp
67     tests/GraphicalSurfaceTest.cpp
68     tests/SurfaceTest.cpp
69     tests/LayerTest.cpp
70     tests/ShaderTest.cpp
71     tests/ShaderUniformTest.cpp
72     tests/ShaderProgramTest.cpp
73     tests/ShaderProgramFactoryTest.cpp
74     tests/RectangleTest.cpp
75     
76     src/GraphicalObject.cpp
77     src/GraphicalSurface.cpp
78     src/Layermanager.cpp
79     src/Scene.cpp
80     src/shader/Shader.cpp
81     src/shader/ShaderProgram.cpp
82     src/shader/ShaderProgramFactory.cpp
83     src/shader/ShaderUniform.cpp
84 )
85 target_link_libraries(LayerManagerService_Test ${LIBS} gtest gmock)
86
87 add_test(LayerManagerService LayerManagerService_Test )
88
89 endif(WITH_TESTS)