1 ############################################################################
3 # Copyright 2010-2012 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 ("${CMAKE_SOURCE_DIR}/config")
30 include_directories ("${CMAKE_SOURCE_DIR}/LayerManagerUtils/include")
31 include_directories ("${CMAKE_SOURCE_DIR}/LayerManagerCommands/include")
33 file(GLOB LM_SOURCES src/*.cpp src/shader/*.cpp)
34 file(GLOB LM_INCLUDES include/*.h)
36 add_executable(LayerManagerService ${LM_SOURCES} ${LM_INCLUDES} ${CMAKE_SOURCE_DIR}/config/config.h)
38 add_dependencies(LayerManagerService LayerManagerUtils)
39 add_dependencies(LayerManagerService LayerManagerCommands)
42 find_package (Threads)
47 ${CMAKE_THREAD_LIBS_INIT}
50 target_link_libraries(LayerManagerService ${LIBS})
52 install (TARGETS LayerManagerService DESTINATION bin)
53 install (FILES ${LM_INCLUDES} DESTINATION include/layermanager)
58 set (CMAKE_CXX_FLAGS "")
59 add_executable(LayerManagerService_Test
62 tests/LayermanagerTest.cpp
63 tests/InputManagerTest.cpp
64 tests/GraphicalObjectTest.cpp
65 tests/GraphicalGroupTest.cpp
66 tests/GraphicalSurfaceTest.cpp
70 tests/ShaderUniformTest.cpp
71 tests/ShaderProgramTest.cpp
72 tests/ShaderProgramFactoryTest.cpp
73 tests/RectangleTest.cpp
75 src/GraphicalObject.cpp
76 src/GraphicalSurface.cpp
84 src/shader/ShaderProgram.cpp
85 src/shader/ShaderProgramFactory.cpp
86 src/shader/ShaderUniform.cpp
89 target_link_libraries(LayerManagerService_Test ${LIBS} gtest gmock)
91 add_test(LayerManagerService LayerManagerService_Test )
96 #=============================================================
97 # configuration depending on system
98 #=============================================================
99 include(CheckFunctionExists)
100 check_function_exists(backtrace_symbols HAVE_BACKTRACE)
102 include(CheckIncludeFiles)
103 check_include_files(execinfo.h HAVE_EXECINFO_H)