Graphic: enabled and fixed build of unit tests for ViewportTransform class
authorTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Tue, 22 May 2012 10:09:00 +0000 (12:09 +0200)
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Wed, 23 May 2012 08:53:43 +0000 (10:53 +0200)
LayerManagerPlugins/Renderers/Graphic/CMakeLists.txt
LayerManagerPlugins/Renderers/Graphic/tests/CMakeLists.txt

index 37c2e4e..6bae529 100644 (file)
@@ -168,10 +168,10 @@ endif (WITH_WAYLAND_X11)
 
 endif(WITH_WAYLAND)
 
-#if (WITH_TESTS)
-#    enable_testing()
-#    add_subdirectory (tests)
-#endif(WITH_TESTS)
+if (WITH_TESTS)
+    enable_testing()
+    add_subdirectory (tests)
+endif(WITH_TESTS)
 
 add_library(${GRAPHIC_LIB_NAME} SHARED ${SOURCES})
 
index d90d387..1625f2e 100644 (file)
 
 cmake_minimum_required (VERSION 2.6)
 
-include_directories (".")
-include_directories ("../include")
-include_directories ("${PROJECT_SOURCE_DIR}/LayerManagerService/include")
-include_directories ("${PROJECT_SOURCE_DIR}/LayerManagerUtils/include")
-
-
 find_package (Threads)
-set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT} LayerManagerUtils)
 
-file(GLOB LM_SOURCES ../../../../LayerManagerService/src/Scene.cpp ../../../../LayerManagerService/src/GraphicalSurface.cpp ../../../../LayerManagerService/src/LogicalGraphicsObject.cpp)
+include_directories(
+    "."
+    "../include"
+    "${PROJECT_SOURCE_DIR}/LayerManagerService/include"
+    "${PROJECT_SOURCE_DIR}/LayerManagerUtils/include"
+)
+
+set(LIBS
+    ${LIBS}
+    ${CMAKE_THREAD_LIBS_INIT}
+    LayerManagerUtils
+)
+
+file(GLOB LM_SOURCES
+    ${PROJECT_SOURCE_DIR}/LayerManagerService/src/Scene.cpp
+    ${PROJECT_SOURCE_DIR}/LayerManagerService/src/GraphicalSurface.cpp
+    ${PROJECT_SOURCE_DIR}/LayerManagerService/src/GraphicalObject.cpp
+    ${PROJECT_SOURCE_DIR}/LayerManagerService/src/LogicalGraphicsObject.cpp
+)
 
 enable_testing()
-add_executable(ViewportTransformTest ${LM_SOURCES} ../src/Transformation/ViewportTransform.cpp ViewportTransformTest.cpp)
-target_link_libraries(ViewportTransformTest ${LIBS} gtest)
 
+add_executable(ViewportTransformTest
+    ${LM_SOURCES}
+    ../src/Transformation/ViewportTransform.cpp
+    ViewportTransformTest.cpp
+)
+
+target_link_libraries(ViewportTransformTest
+    ${LIBS}
+    gtest
+)
 
 add_test(ViewportTransformations ViewportTransformTest)