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)
24 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xlinker -export-dynamic")
27 find_package(AutomotiveDlt REQUIRED)
28 include_directories(${DLT_INCLUDE_DIR})
33 ${CMAKE_SOURCE_DIR}/config
34 ${CMAKE_SOURCE_DIR}/LayerManagerUtils/include
35 ${CMAKE_SOURCE_DIR}/LayerManagerCommands/include
40 src/GraphicalObject.cpp
41 src/GraphicalSurface.cpp
50 src/ShaderProgramFactory.cpp
54 add_library(${PROJECT_NAME} STATIC ${SRC_FILES})
56 add_dependencies(${PROJECT_NAME}
60 find_package (Threads)
64 ${CMAKE_THREAD_LIBS_INIT}
66 ${STATICALLY_LINKED_PLUGINS}
69 target_link_libraries(${PROJECT_NAME} ${LIBS})
71 file(GLOB LM_INCLUDES include/*.h)
73 install (FILES ${LM_INCLUDES} DESTINATION include/layermanager)
78 find_package (Threads)
82 set (CMAKE_CXX_FLAGS "")
84 add_executable(${PROJECT_NAME}_Test
86 tests/LayermanagerTest.cpp
87 tests/InputManagerTest.cpp
88 tests/GraphicalObjectTest.cpp
89 tests/GraphicalGroupTest.cpp
90 tests/GraphicalSurfaceTest.cpp
94 tests/ShaderUniformTest.cpp
95 tests/ShaderProgramTest.cpp
96 tests/ShaderProgramFactoryTest.cpp
97 tests/RectangleTest.cpp
100 target_link_libraries(${PROJECT_NAME}_Test
105 ${CMAKE_THREAD_LIBS_INIT}
108 add_test(${PROJECT_NAME} ${PROJECT_NAME}_Test)
113 #=============================================================
114 # configuration depending on system
115 #=============================================================
116 include(CheckFunctionExists)
117 check_function_exists(backtrace_symbols HAVE_BACKTRACE)
119 include(CheckIncludeFiles)
120 check_include_files(execinfo.h HAVE_EXECINFO_H)