LayerManagerBase: fixed unit test build to use unit test configuration
[profile/ivi/layer-management.git] / LayerManagerBase / 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 project(LayerManagerBase)
23 project_type(CORE)
24
25 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xlinker -export-dynamic")
26
27 if (WITH_DLT)
28     find_package(AutomotiveDlt REQUIRED)
29     include_directories(${DLT_INCLUDE_DIR})
30 endif (WITH_DLT)
31
32 include_directories(
33     include
34     ${CMAKE_SOURCE_DIR}/config
35     ${CMAKE_SOURCE_DIR}/LayerManagerUtils/include
36     ${CMAKE_SOURCE_DIR}/LayerManagerCommands/include
37 )
38
39 set(SRC_FILES
40     src/Configuration.cpp
41     src/GraphicalObject.cpp
42     src/GraphicalSurface.cpp
43     src/InputManager.cpp
44     src/Layermanager.cpp
45     src/PluginBase.cpp
46     src/PluginManager.cpp
47     src/Scene.cpp
48     src/SignalHandler.cpp
49     src/Shader.cpp
50     src/ShaderProgram.cpp
51     src/ShaderProgramFactory.cpp
52     src/ShaderUniform.cpp
53 )
54
55 add_library(${PROJECT_NAME} STATIC ${SRC_FILES})
56
57 add_dependencies(${PROJECT_NAME}
58     LayerManagerUtils
59 )
60
61 find_package (Threads)
62 set(LIBS ${LIBS}
63     LayerManagerUtils
64     dl
65     ${CMAKE_THREAD_LIBS_INIT}
66     ${DLT_LIBRARY}
67     ${STATICALLY_LINKED_PLUGINS}
68
69
70 target_link_libraries(${PROJECT_NAME} ${LIBS})
71
72 file(GLOB LM_INCLUDES include/*.h)
73
74 install (FILES ${LM_INCLUDES} DESTINATION include/layermanager)
75
76
77 #=============================================================
78 # configuration depending on system
79 #=============================================================
80 include(CheckFunctionExists)
81 check_function_exists(backtrace_symbols HAVE_BACKTRACE)
82 export_build_flag(HAVE_BACKTRACE "platform support for backtrace command")
83
84 include(CheckIncludeFiles)
85 check_include_files(execinfo.h HAVE_EXECINFO_H)
86 export_build_flag(HAVE_EXECINFO_H "platform has execinfo.h header file")
87
88
89 add_subdirectory(tests)