LayerManagerBase: fixed unit test build to use unit test configuration
[profile/ivi/layer-management.git] / LayerManagerBase / tests / CMakeLists.txt
1 ############################################################################
2
3 # Copyright 2010-2012 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 if (WITH_TESTS)
23
24     enable_testing()
25
26     project(LayerManagerBase_Test)
27     project_type(TEST)
28
29     set(LIBS ${LIBS}
30         LayerManagerBase
31         gtest
32         gmock
33     )
34
35     add_executable(${PROJECT_NAME}
36         SceneTest.cpp
37         ScreenTest.cpp
38         LayermanagerTest.cpp
39         InputManagerTest.cpp
40         GraphicalObjectTest.cpp
41         GraphicalSurfaceTest.cpp
42         SurfaceTest.cpp
43         LayerTest.cpp
44         ShaderTest.cpp
45         ShaderUniformTest.cpp
46         ShaderProgramTest.cpp
47         ShaderProgramFactoryTest.cpp
48         RectangleTest.cpp
49     )
50
51     target_link_libraries(${PROJECT_NAME}
52         ${LIBS}
53         ${CMAKE_THREAD_LIBS_INIT}
54     )
55
56     add_dependencies(${PROJECT_NAME} ${LIBS})
57
58     install(FILES       ${PROJECT_NAME}
59             DESTINATION bin)
60
61     add_test(LayerManagerBase ${PROJECT_NAME})
62
63 endif(WITH_TESTS) 
64