1 ############################################################################
3 # Copyright 2010, 2011 BMW Car IT GmbH
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
10 # http://www.apache.org/licenses/LICENSE-2.0
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.
18 ############################################################################
20 cmake_minimum_required (VERSION 2.6)
22 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xlinker -export-dynamic")
24 find_package(AutomotiveDlt REQUIRED)
25 include_directories(${DLT_INCLUDE_DIR})
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")
33 link_directories ("${PROJECT_SOURCE_DIR}/LayerManagerUtils/bin")
34 link_directories ("${PROJECT_SOURCE_DIR}/LayerManagerCommands")
36 file(GLOB LM_SOURCES src/*.cpp src/shader/*.cpp)
37 file(GLOB LM_INCLUDES include/*.h)
39 add_executable(LayerManagerService ${LM_SOURCES} ${LM_INCLUDES} ${PROJECT_SOURCE_DIR}/config/config.h)
41 add_dependencies(LayerManagerService LayerManagerUtils)
42 add_dependencies(LayerManagerService LayerManagerCommands)
45 find_package (Threads)
50 ${CMAKE_THREAD_LIBS_INIT}
53 target_link_libraries(LayerManagerService ${LIBS})
55 install (TARGETS LayerManagerService DESTINATION bin)
56 install (FILES ${LM_INCLUDES} DESTINATION include/layermanager)
62 add_executable(LayerManagerService_Test
64 tests/LayermanagerTest.cpp
65 tests/GraphicalObjectTest.cpp
66 tests/GraphicalGroupTest.cpp
67 tests/GraphicalSurfaceTest.cpp
71 tests/ShaderUniformTest.cpp
72 tests/ShaderProgramTest.cpp
73 tests/ShaderProgramFactoryTest.cpp
74 tests/RectangleTest.cpp
76 src/GraphicalObject.cpp
77 src/GraphicalSurface.cpp
81 src/shader/ShaderProgram.cpp
82 src/shader/ShaderProgramFactory.cpp
83 src/shader/ShaderUniform.cpp
85 target_link_libraries(LayerManagerService_Test ${LIBS} gtest gmock)
87 add_test(LayerManagerService LayerManagerService_Test )