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 project(LayerManagerBase)
25 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xlinker -export-dynamic")
28 find_package(AutomotiveDlt REQUIRED)
29 include_directories(${DLT_INCLUDE_DIR})
34 ${CMAKE_SOURCE_DIR}/config
35 ${CMAKE_SOURCE_DIR}/LayerManagerUtils/include
36 ${CMAKE_SOURCE_DIR}/LayerManagerCommands/include
41 src/GraphicalObject.cpp
42 src/GraphicalSurface.cpp
51 src/ShaderProgramFactory.cpp
55 add_library(${PROJECT_NAME} STATIC ${SRC_FILES})
57 add_dependencies(${PROJECT_NAME}
61 find_package (Threads)
65 ${CMAKE_THREAD_LIBS_INIT}
67 ${STATICALLY_LINKED_PLUGINS}
70 target_link_libraries(${PROJECT_NAME} ${LIBS})
72 file(GLOB LM_INCLUDES include/*.h)
74 install (FILES ${LM_INCLUDES} DESTINATION include/layermanager)
79 find_package (Threads)
83 add_executable(${PROJECT_NAME}_Test
86 tests/LayermanagerTest.cpp
87 tests/InputManagerTest.cpp
88 tests/GraphicalObjectTest.cpp
89 tests/GraphicalSurfaceTest.cpp
93 tests/ShaderUniformTest.cpp
94 tests/ShaderProgramTest.cpp
95 tests/ShaderProgramFactoryTest.cpp
96 tests/RectangleTest.cpp
99 target_link_libraries(${PROJECT_NAME}_Test
104 ${CMAKE_THREAD_LIBS_INIT}
107 add_test(${PROJECT_NAME} ${PROJECT_NAME}_Test)
112 #=============================================================
113 # configuration depending on system
114 #=============================================================
115 include(CheckFunctionExists)
116 check_function_exists(backtrace_symbols HAVE_BACKTRACE)
117 export_build_flag(HAVE_BACKTRACE "platform support for backtrace command")
119 include(CheckIncludeFiles)
120 check_include_files(execinfo.h HAVE_EXECINFO_H)
121 export_build_flag(HAVE_EXECINFO_H "platform has execinfo.h header file")