install (FILES ${LM_INCLUDES} DESTINATION include/layermanager)
-if (WITH_TESTS)
-
- find_package (Threads)
-
- enable_testing()
-
- add_executable(${PROJECT_NAME}_Test
- tests/SceneTest.cpp
- tests/ScreenTest.cpp
- tests/LayermanagerTest.cpp
- tests/InputManagerTest.cpp
- tests/GraphicalObjectTest.cpp
- tests/GraphicalSurfaceTest.cpp
- tests/SurfaceTest.cpp
- tests/LayerTest.cpp
- tests/ShaderTest.cpp
- tests/ShaderUniformTest.cpp
- tests/ShaderProgramTest.cpp
- tests/ShaderProgramFactoryTest.cpp
- tests/RectangleTest.cpp
- )
-
- target_link_libraries(${PROJECT_NAME}_Test
- ${LIBS}
- LayerManagerBase
- gtest
- gmock
- ${CMAKE_THREAD_LIBS_INIT}
- )
-
- add_test(${PROJECT_NAME} ${PROJECT_NAME}_Test)
-
-endif(WITH_TESTS)
-
-
#=============================================================
# configuration depending on system
#=============================================================
check_include_files(execinfo.h HAVE_EXECINFO_H)
export_build_flag(HAVE_EXECINFO_H "platform has execinfo.h header file")
+
+add_subdirectory(tests)
--- /dev/null
+############################################################################
+#
+# Copyright 2010-2012 BMW Car IT GmbH
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+############################################################################
+
+cmake_minimum_required (VERSION 2.6)
+
+if (WITH_TESTS)
+
+ enable_testing()
+
+ project(LayerManagerBase_Test)
+ project_type(TEST)
+
+ set(LIBS ${LIBS}
+ LayerManagerBase
+ gtest
+ gmock
+ )
+
+ add_executable(${PROJECT_NAME}
+ SceneTest.cpp
+ ScreenTest.cpp
+ LayermanagerTest.cpp
+ InputManagerTest.cpp
+ GraphicalObjectTest.cpp
+ GraphicalSurfaceTest.cpp
+ SurfaceTest.cpp
+ LayerTest.cpp
+ ShaderTest.cpp
+ ShaderUniformTest.cpp
+ ShaderProgramTest.cpp
+ ShaderProgramFactoryTest.cpp
+ RectangleTest.cpp
+ )
+
+ target_link_libraries(${PROJECT_NAME}
+ ${LIBS}
+ ${CMAKE_THREAD_LIBS_INIT}
+ )
+
+ add_dependencies(${PROJECT_NAME} ${LIBS})
+
+ install(FILES ${PROJECT_NAME}
+ DESTINATION bin)
+
+ add_test(LayerManagerBase ${PROJECT_NAME})
+
+endif(WITH_TESTS)
+