From e82e4b8bd8625995e6ac1a694da18b3df76a680d Mon Sep 17 00:00:00 2001
From: Raphael Grimm <raphael.grimm@kit.edu>
Date: Wed, 20 Feb 2019 18:15:21 +0100
Subject: [PATCH] Modernize and clean up cmake

# Conflicts:
#	source/RobotAPI/drivers/KITProsthesisIceDriver/CMakeLists.txt
#	source/RobotAPI/libraries/RobotAPINJointControllers/CMakeLists.txt
---
 CMakeLists.txt                                | 15 -------
 etc/cmake/UseRobotAPI.cmake                   |  2 +
 .../DebugDrawerTestApp/CMakeLists.txt         |  8 ++--
 .../RemoteRobotTestProject/CMakeLists.txt     |  9 +---
 .../CyberGloveObserver/CMakeLists.txt         | 21 +--------
 .../DummyTextToSpeech/CMakeLists.txt          | 21 +--------
 .../ForceTorqueUnitSimulation/CMakeLists.txt  | 13 +-----
 .../HandUnitSimulation/CMakeLists.txt         | 15 +------
 .../HapticObserver/CMakeLists.txt             | 13 +-----
 .../applications/HeadIKUnit/CMakeLists.txt    | 19 +-------
 .../KITProstheticHandObserver/CMakeLists.txt  | 21 +--------
 .../KITProstheticHandUnit/CMakeLists.txt      | 21 +--------
 .../KinematicUnitSimulation/CMakeLists.txt    | 20 +--------
 .../applications/OptoForceUnit/CMakeLists.txt | 24 +---------
 .../OrientedTactileSensorUnit/CMakeLists.txt  | 15 +------
 .../applications/RobotHealth/CMakeLists.txt   | 21 +--------
 .../RobotHealthDummy/CMakeLists.txt           | 21 +--------
 .../RobotNameService/CMakeLists.txt           | 21 +--------
 .../RobotStateComponent/CMakeLists.txt        | 13 +-----
 .../RobotStateObserver/CMakeLists.txt         | 11 -----
 .../TCPControlUnit/CMakeLists.txt             | 15 -------
 .../applications/ViewSelection/CMakeLists.txt | 15 +------
 .../WeissHapticUnit/CMakeLists.txt            | 12 +----
 .../MotionControlTest/CMakeLists.txt          | 10 -----
 .../CMakeLists.txt                            | 17 -------
 .../RobotIKApp.h                              | 45 -------------------
 .../moved_to_robotcomponents_RobotIK/main.cpp | 34 --------------
 .../CyberGloveObserver/CMakeLists.txt         | 25 ++---------
 .../components/DebugDrawer/CMakeLists.txt     | 20 +--------
 .../DummyTextToSpeech/CMakeLists.txt          | 24 ++--------
 .../EarlyVisionGraph/CMakeLists.txt           | 11 ++---
 .../KITProstheticHandObserver/CMakeLists.txt  | 24 ++--------
 .../RobotHealthDummy/CMakeLists.txt           | 24 ++--------
 .../RobotNameService/CMakeLists.txt           | 24 ++--------
 .../components/RobotState/CMakeLists.txt      | 10 -----
 .../components/ViewSelection/CMakeLists.txt   | 11 -----
 .../RobotAPI/components/units/CMakeLists.txt  | 12 -----
 .../components/units/RobotUnit/CMakeLists.txt | 13 ------
 .../KITProsthesisIceDriver/CMakeLists.txt     | 13 ++++++
 .../KITProstheticHandDriver/CMakeLists.txt    | 11 ++---
 .../RobotAPI/drivers/OptoForce/CMakeLists.txt | 11 +++--
 .../drivers/OptoForceUnit/CMakeLists.txt      |  7 ++-
 .../OrientedTactileSensor/CMakeLists.txt      | 17 +------
 .../drivers/WeissHapticSensor/CMakeLists.txt  |  8 ----
 .../GuiHealthClient/CMakeLists.txt            | 31 ++-----------
 .../gui-plugins/HandUnitPlugin/CMakeLists.txt |  8 +---
 .../HapticUnitPlugin/CMakeLists.txt           | 12 +----
 .../CMakeLists.txt                            | 14 +-----
 .../KinematicUnitPlugin/CMakeLists.txt        | 14 +-----
 .../PlatformUnitPlugin/CMakeLists.txt         |  5 +--
 .../RobotViewerPlugin/CMakeLists.txt          | 15 +------
 .../SensorActorWidgetsPlugin/CMakeLists.txt   | 19 +++-----
 .../libraries/ArmarXEtherCAT/CMakeLists.txt   | 34 ++------------
 .../libraries/DMPController/CMakeLists.txt    | 31 +++----------
 .../RobotAPINJointControllers/CMakeLists.txt  | 20 ++-------
 .../RobotStatechartHelpers/CMakeLists.txt     | 20 ---------
 .../libraries/SimpleJsonLogger/CMakeLists.txt | 25 +----------
 source/RobotAPI/libraries/core/CMakeLists.txt | 31 +------------
 .../core/remoterobot/test/CMakeLists.txt      |  6 +--
 .../RobotAPI/libraries/widgets/CMakeLists.txt | 29 +++++-------
 .../ForceTorqueUtility/CMakeLists.txt         | 45 ++-----------------
 .../RobotNameHelperTestGroup/CMakeLists.txt   | 44 ++----------------
 .../SpeechObserverTestGroup/CMakeLists.txt    | 44 ++----------------
 .../WeissHapticGroup/CMakeLists.txt           | 11 -----
 .../statecharts/operations/CMakeLists.txt     | 10 -----
 65 files changed, 134 insertions(+), 1071 deletions(-)
 delete mode 100644 source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/CMakeLists.txt
 delete mode 100644 source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/RobotIKApp.h
 delete mode 100644 source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/main.cpp
 create mode 100644 source/RobotAPI/drivers/KITProsthesisIceDriver/CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0041560e7..12a6ea10e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,5 @@
 # RobotAPI
 cmake_minimum_required(VERSION 3.10.2)
-#if(NOT DEFINED CMAKE_SUPPRESS_DEVELOPER_WARNINGS)
-#     set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE INTERNAL "No dev warnings")
-#endif()
 
 if(POLICY CMP0043)
     cmake_policy(SET CMP0043 OLD)
@@ -28,18 +25,6 @@ if(REQUIRE_SIMOX)
 else()
     find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
 endif()
-if (Simox_FOUND)
-        setupSimoxExternalLibraries()
-    if(ARMARX_USE_QT5)
-        if(Simox_USE_QT4)
-            message(FATAL_ERROR "ArmarX uses Qt5 and Simox uses Qt4")
-        endif()
-    else()
-        if(Simox_USE_QT5)
-            message(FATAL_ERROR "ArmarX uses Qt4 and Simox uses Qt5")
-        endif()
-    endif()
-endif()
 
 add_subdirectory(source)
 
diff --git a/etc/cmake/UseRobotAPI.cmake b/etc/cmake/UseRobotAPI.cmake
index ddbb6cead..de1c501c0 100644
--- a/etc/cmake/UseRobotAPI.cmake
+++ b/etc/cmake/UseRobotAPI.cmake
@@ -1 +1,3 @@
 # This file contains macros for projects depending on RobotAPI
+find_package(Simox QUIET)
+find_package(Eigen3 QUIET)
diff --git a/scenarios/tests/DebugDrawerTest/DebugDrawerTestApp/CMakeLists.txt b/scenarios/tests/DebugDrawerTest/DebugDrawerTestApp/CMakeLists.txt
index b91f9e036..4dce5604f 100644
--- a/scenarios/tests/DebugDrawerTest/DebugDrawerTestApp/CMakeLists.txt
+++ b/scenarios/tests/DebugDrawerTest/DebugDrawerTestApp/CMakeLists.txt
@@ -2,9 +2,7 @@ armarx_component_set_name("DebugDrawerTestApp")
 
 find_package(Eigen3 QUIET)
 armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-if(Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
+
 
 set(COMPONENT_LIBS
 ArmarXCoreInterfaces
@@ -16,4 +14,6 @@ DebugDrawer
 set(EXE_SOURCE main.cpp DebugDrawerTestApp.h DebugDrawerTest.h DebugDrawerTest.cpp)
 
 armarx_add_component_executable("${EXE_SOURCE}")
-
+if(Eigen3_FOUND)
+    target_include_directories(DebugDrawerTestAppRun SYSTEM PUBLIC ${Eigen3_INCLUDE_DIR})
+endif()
diff --git a/scenarios/tests/RemoteRobotTest/RemoteRobotTestProject/CMakeLists.txt b/scenarios/tests/RemoteRobotTest/RemoteRobotTestProject/CMakeLists.txt
index ed0078128..b0b0d7627 100644
--- a/scenarios/tests/RemoteRobotTest/RemoteRobotTestProject/CMakeLists.txt
+++ b/scenarios/tests/RemoteRobotTest/RemoteRobotTestProject/CMakeLists.txt
@@ -32,25 +32,18 @@ armarx_component_set_name(RemoteRobotTestProject)
 
 set(COMPONENT_BUILD TRUE)
 
-find_package(Eigen3 QUIET)
 find_package(Simox QUIET)
 
 armarx_component_if(COMPONENT_BUILD "component disabled")
-armarx_component_if(Eigen3_FOUND "Eigen3 not available")
 armarx_component_if(Simox_FOUND "VirtualRobot not available")
 
 if (ARMARX_BUILD)
-    include_directories(${ArmarXCore_INCLUDE_DIRS})
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-    include_directories(${Simox_INCLUDE_DIR})
     
     set(COMPONENT_LIBS
         RemoteRobotTestProjectInterfaces
-        ArmarXInterfaces
         ArmarXCoreRemoteRobot
         ArmarXCore
-        ${Simox_LIBRARIES}
-        ${Coin3D_LIBRARIES}
+        VirtualRobot
     )
 
     set(SOURCES RemoteRobotTestProject.cpp
diff --git a/source/RobotAPI/applications/CyberGloveObserver/CMakeLists.txt b/source/RobotAPI/applications/CyberGloveObserver/CMakeLists.txt
index 59a112e59..a639bd1bd 100644
--- a/source/RobotAPI/applications/CyberGloveObserver/CMakeLists.txt
+++ b/source/RobotAPI/applications/CyberGloveObserver/CMakeLists.txt
@@ -1,20 +1,3 @@
 armarx_component_set_name("CyberGloveObserverApp")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS
-    ArmarXCoreInterfaces
-    ArmarXCore
-    CyberGloveObserver
-)
-
-set(EXE_SOURCE main.cpp)
-
-armarx_add_component_executable("${EXE_SOURCE}")
+set(COMPONENT_LIBS CyberGloveObserver)
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/DummyTextToSpeech/CMakeLists.txt b/source/RobotAPI/applications/DummyTextToSpeech/CMakeLists.txt
index c33714015..68e57d98b 100644
--- a/source/RobotAPI/applications/DummyTextToSpeech/CMakeLists.txt
+++ b/source/RobotAPI/applications/DummyTextToSpeech/CMakeLists.txt
@@ -1,20 +1,3 @@
 armarx_component_set_name("DummyTextToSpeechApp")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS
-    ArmarXCoreInterfaces
-    ArmarXCore
-    DummyTextToSpeech
-)
-
-set(EXE_SOURCE main.cpp)
-
-armarx_add_component_executable("${EXE_SOURCE}")
+set(COMPONENT_LIBS DummyTextToSpeech)
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/ForceTorqueUnitSimulation/CMakeLists.txt b/source/RobotAPI/applications/ForceTorqueUnitSimulation/CMakeLists.txt
index c59c5263a..581a8ae85 100644
--- a/source/RobotAPI/applications/ForceTorqueUnitSimulation/CMakeLists.txt
+++ b/source/RobotAPI/applications/ForceTorqueUnitSimulation/CMakeLists.txt
@@ -1,14 +1,3 @@
 armarx_component_set_name(ForceTorqueUnitSimulation)
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-
-if (Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(COMPONENT_LIBS RobotAPIUnits)
-
-set(SOURCES main.cpp)
-
-armarx_add_component_executable("${SOURCES}")
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/HandUnitSimulation/CMakeLists.txt b/source/RobotAPI/applications/HandUnitSimulation/CMakeLists.txt
index 4d64f526f..78cd12fe1 100644
--- a/source/RobotAPI/applications/HandUnitSimulation/CMakeLists.txt
+++ b/source/RobotAPI/applications/HandUnitSimulation/CMakeLists.txt
@@ -1,14 +1,3 @@
 armarx_component_set_name("HandUnitSimulation")
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-
-if (Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
-set(COMPONENT_LIBS RobotAPIUnits ArmarXCoreInterfaces ArmarXCore)
-
-set(EXE_SOURCE main.cpp)
-
-armarx_add_component_executable("${EXE_SOURCE}")
+set(COMPONENT_LIBS RobotAPIUnits)
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/HapticObserver/CMakeLists.txt b/source/RobotAPI/applications/HapticObserver/CMakeLists.txt
index 25be6abb0..7b9bff253 100644
--- a/source/RobotAPI/applications/HapticObserver/CMakeLists.txt
+++ b/source/RobotAPI/applications/HapticObserver/CMakeLists.txt
@@ -1,14 +1,3 @@
 armarx_component_set_name("HapticObserverApp")
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-
-if (Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(COMPONENT_LIBS RobotAPIUnits)
-
-set(EXE_SOURCE main.cpp)
-
-armarx_add_component_executable("${EXE_SOURCE}")
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/HeadIKUnit/CMakeLists.txt b/source/RobotAPI/applications/HeadIKUnit/CMakeLists.txt
index 046b5aecc..11d3ea4c2 100644
--- a/source/RobotAPI/applications/HeadIKUnit/CMakeLists.txt
+++ b/source/RobotAPI/applications/HeadIKUnit/CMakeLists.txt
@@ -1,20 +1,3 @@
 armarx_component_set_name(HeadIKUnit)
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-
-if (Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-if(Simox_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-endif()
-
 set(COMPONENT_LIBS RobotAPIUnits)
-
-set(SOURCES main.cpp)
-
-armarx_add_component_executable("${SOURCES}")
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/KITProstheticHandObserver/CMakeLists.txt b/source/RobotAPI/applications/KITProstheticHandObserver/CMakeLists.txt
index 7a1c165a3..ea8df22f5 100644
--- a/source/RobotAPI/applications/KITProstheticHandObserver/CMakeLists.txt
+++ b/source/RobotAPI/applications/KITProstheticHandObserver/CMakeLists.txt
@@ -1,20 +1,3 @@
 armarx_component_set_name("KITProstheticHandObserverApp")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS
-    ArmarXCoreInterfaces
-    ArmarXCore
-    KITProstheticHandObserver
-)
-
-set(EXE_SOURCE main.cpp)
-
-armarx_add_component_executable("${EXE_SOURCE}")
+set(COMPONENT_LIBS KITProstheticHandObserver)
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/KITProstheticHandUnit/CMakeLists.txt b/source/RobotAPI/applications/KITProstheticHandUnit/CMakeLists.txt
index 1a707f613..695303d1d 100644
--- a/source/RobotAPI/applications/KITProstheticHandUnit/CMakeLists.txt
+++ b/source/RobotAPI/applications/KITProstheticHandUnit/CMakeLists.txt
@@ -1,20 +1,3 @@
 armarx_component_set_name("KITProstheticHandUnitApp")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS
-    ArmarXCoreInterfaces
-    ArmarXCore
-    KITProstheticHandUnit
-)
-
-set(EXE_SOURCE main.cpp)
-
-armarx_add_component_executable("${EXE_SOURCE}")
+set(COMPONENT_LIBS KITProstheticHandUnit)
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/KinematicUnitSimulation/CMakeLists.txt b/source/RobotAPI/applications/KinematicUnitSimulation/CMakeLists.txt
index e4894ae1a..da3097f2b 100644
--- a/source/RobotAPI/applications/KinematicUnitSimulation/CMakeLists.txt
+++ b/source/RobotAPI/applications/KinematicUnitSimulation/CMakeLists.txt
@@ -1,21 +1,3 @@
-
 armarx_component_set_name(KinematicUnitSimulation)
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-
-if (Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-if(Simox_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-endif()
-
 set(COMPONENT_LIBS RobotAPIUnits)
-
-set(SOURCES main.cpp)
-
-armarx_add_component_executable("${SOURCES}")
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/OptoForceUnit/CMakeLists.txt b/source/RobotAPI/applications/OptoForceUnit/CMakeLists.txt
index 111e59016..314d412e2 100644
--- a/source/RobotAPI/applications/OptoForceUnit/CMakeLists.txt
+++ b/source/RobotAPI/applications/OptoForceUnit/CMakeLists.txt
@@ -1,23 +1,3 @@
 armarx_component_set_name("OptoForceUnitApp")
-
-find_package(OptoForceOMD QUIET)
-armarx_build_if(OptoForceOMD_FOUND "OptoForceOMD not available")
-
-if(OptoForceOMD_FOUND)
-    include_directories(SYSTEM ${OptoForceOMD_INCLUDE_DIR})
-endif()
-
-#message("OptoForceOMD_INCLUDE_DIR: " ${OptoForceOMD_INCLUDE_DIR})
-#message("OptoForceOMD_LIBRARIES: " ${OptoForceOMD_LIBRARIES})
-
-set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore ${OptoForceOMD_LIBRARIES})
-
-set(COMPONENT_LIBS
-    ArmarXCoreInterfaces
-    ArmarXCore
-    OptoForceUnit
-)
-
-set(EXE_SOURCE main.cpp)
-
-armarx_add_component_executable("${EXE_SOURCE}")
+set(COMPONENT_LIBS  OptoForceUnit)
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/OrientedTactileSensorUnit/CMakeLists.txt b/source/RobotAPI/applications/OrientedTactileSensorUnit/CMakeLists.txt
index 96ed0a00c..d55194dc8 100644
--- a/source/RobotAPI/applications/OrientedTactileSensorUnit/CMakeLists.txt
+++ b/source/RobotAPI/applications/OrientedTactileSensorUnit/CMakeLists.txt
@@ -1,14 +1,3 @@
 armarx_component_set_name("OrientedTactileSensorUnitApp")
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-
-if (Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
-set(COMPONENT_LIBS RobotAPIUnits OrientedTactileSensor )
-
-set(EXE_SOURCE main.cpp)
-
-armarx_add_component_executable("${EXE_SOURCE}")
+set(COMPONENT_LIBS OrientedTactileSensor)
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/RobotHealth/CMakeLists.txt b/source/RobotAPI/applications/RobotHealth/CMakeLists.txt
index 3483b473d..1009dfb45 100644
--- a/source/RobotAPI/applications/RobotHealth/CMakeLists.txt
+++ b/source/RobotAPI/applications/RobotHealth/CMakeLists.txt
@@ -1,20 +1,3 @@
 armarx_component_set_name("RobotHealthApp")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS
-    ArmarXCoreInterfaces
-    ArmarXCore
-    RobotHealth
-)
-
-set(EXE_SOURCE main.cpp)
-
-armarx_add_component_executable("${EXE_SOURCE}")
+set(COMPONENT_LIBS RobotHealth)
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/RobotHealthDummy/CMakeLists.txt b/source/RobotAPI/applications/RobotHealthDummy/CMakeLists.txt
index bf1775f49..47f7ea245 100644
--- a/source/RobotAPI/applications/RobotHealthDummy/CMakeLists.txt
+++ b/source/RobotAPI/applications/RobotHealthDummy/CMakeLists.txt
@@ -1,20 +1,3 @@
 armarx_component_set_name("RobotHealthDummyApp")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS
-    ArmarXCoreInterfaces
-    ArmarXCore
-    RobotHealth
-)
-
-set(EXE_SOURCE main.cpp)
-
-armarx_add_component_executable("${EXE_SOURCE}")
+set(COMPONENT_LIBS RobotHealth)
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/RobotNameService/CMakeLists.txt b/source/RobotAPI/applications/RobotNameService/CMakeLists.txt
index e6d4d36c4..0e89b9bfe 100644
--- a/source/RobotAPI/applications/RobotNameService/CMakeLists.txt
+++ b/source/RobotAPI/applications/RobotNameService/CMakeLists.txt
@@ -1,20 +1,3 @@
 armarx_component_set_name("RobotNameServiceApp")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS
-    ArmarXCoreInterfaces
-    ArmarXCore
-    RobotNameService
-)
-
-set(EXE_SOURCE main.cpp)
-
-armarx_add_component_executable("${EXE_SOURCE}")
+set(COMPONENT_LIBS RobotNameService)
+armarx_add_component_executable("main.cpp")
diff --git a/source/RobotAPI/applications/RobotStateComponent/CMakeLists.txt b/source/RobotAPI/applications/RobotStateComponent/CMakeLists.txt
index 93a007e53..9c80d51b8 100644
--- a/source/RobotAPI/applications/RobotStateComponent/CMakeLists.txt
+++ b/source/RobotAPI/applications/RobotStateComponent/CMakeLists.txt
@@ -1,15 +1,4 @@
-
 armarx_component_set_name(RobotStateComponent)
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "component disabled")
-
-if(Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
-set(COMPONENT_LIBS RobotAPICore RobotAPIRobotStateComponent)
-
+set(COMPONENT_LIBS RobotAPIRobotStateComponent)
 set(SOURCES main.cpp RobotStateComponentApp.h)
-
 armarx_add_component_executable("${SOURCES}")
diff --git a/source/RobotAPI/applications/RobotStateObserver/CMakeLists.txt b/source/RobotAPI/applications/RobotStateObserver/CMakeLists.txt
index c77b0c879..656f13498 100644
--- a/source/RobotAPI/applications/RobotStateObserver/CMakeLists.txt
+++ b/source/RobotAPI/applications/RobotStateObserver/CMakeLists.txt
@@ -1,15 +1,4 @@
-
 armarx_component_set_name(RobotStateObserver)
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "component disabled")
-
-if(Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(COMPONENT_LIBS RobotAPICore)
-
 set(SOURCES main.cpp RobotStateObserverApp.h)
-
 armarx_add_component_executable("${SOURCES}")
diff --git a/source/RobotAPI/applications/TCPControlUnit/CMakeLists.txt b/source/RobotAPI/applications/TCPControlUnit/CMakeLists.txt
index 8f4266fc8..09c5e525c 100644
--- a/source/RobotAPI/applications/TCPControlUnit/CMakeLists.txt
+++ b/source/RobotAPI/applications/TCPControlUnit/CMakeLists.txt
@@ -1,19 +1,4 @@
 armarx_component_set_name(TCPControlUnit)
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-if (Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-if(Simox_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-endif()
-
 set(COMPONENT_LIBS RobotAPIUnits)
-
 set(SOURCES main.cpp TCPControlUnitApp.h)
-
 armarx_add_component_executable("${SOURCES}")
diff --git a/source/RobotAPI/applications/ViewSelection/CMakeLists.txt b/source/RobotAPI/applications/ViewSelection/CMakeLists.txt
index 16826a966..feeeadcdd 100644
--- a/source/RobotAPI/applications/ViewSelection/CMakeLists.txt
+++ b/source/RobotAPI/applications/ViewSelection/CMakeLists.txt
@@ -1,17 +1,4 @@
 armarx_component_set_name("ViewSelectionApp")
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-if(Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
-set(COMPONENT_LIBS
-    ViewSelection
-    RobotAPIInterfaces RobotAPICore
-    ArmarXCoreInterfaces ArmarXCore ArmarXCoreStatechart ArmarXCoreObservers
-)
-
+set(COMPONENT_LIBS ViewSelection)
 set(EXE_SOURCE main.cpp ViewSelectionApp.h)
-
 armarx_add_component_executable("${EXE_SOURCE}")
diff --git a/source/RobotAPI/applications/WeissHapticUnit/CMakeLists.txt b/source/RobotAPI/applications/WeissHapticUnit/CMakeLists.txt
index 4009973e4..847fb17ee 100644
--- a/source/RobotAPI/applications/WeissHapticUnit/CMakeLists.txt
+++ b/source/RobotAPI/applications/WeissHapticUnit/CMakeLists.txt
@@ -1,14 +1,4 @@
 armarx_component_set_name("WeissHapticUnitApp")
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-
-if (Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
-set(COMPONENT_LIBS RobotAPIUnits WeissHapticSensor )
-
+set(COMPONENT_LIBS WeissHapticSensor )
 set(EXE_SOURCE main.cpp WeissHapticUnitApp.h)
-
 armarx_add_component_executable("${EXE_SOURCE}")
diff --git a/source/RobotAPI/applications/deprecated/MotionControlTest/CMakeLists.txt b/source/RobotAPI/applications/deprecated/MotionControlTest/CMakeLists.txt
index 415f7312a..d31601d58 100644
--- a/source/RobotAPI/applications/deprecated/MotionControlTest/CMakeLists.txt
+++ b/source/RobotAPI/applications/deprecated/MotionControlTest/CMakeLists.txt
@@ -1,14 +1,4 @@
 armarx_component_set_name(MotionControlTest)
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-
-if (Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(COMPONENT_LIBS MotionControl)
-
 set(SOURCES main.cpp MotionControlTestApp.h)
-
 armarx_add_component_executable("${SOURCES}")
diff --git a/source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/CMakeLists.txt b/source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/CMakeLists.txt
deleted file mode 100644
index 420a26d10..000000000
--- a/source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-armarx_component_set_name(RobotIK)
-
-find_package(Eigen3 QUIET)
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-armarx_build_if(Eigen3_FOUND "component disabled")
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-if(Eigen3_FOUND AND Simox_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-    include_directories(${Simox_INCLUDE_DIRS})
-endif()
-
-set(COMPONENT_LIBS RobotAPICore RobotAPIRobotIK)
-
-set(SOURCES main.cpp RobotIKApp.h)
-
-armarx_add_component_executable("${SOURCES}")
diff --git a/source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/RobotIKApp.h b/source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/RobotIKApp.h
deleted file mode 100644
index 958331f3e..000000000
--- a/source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/RobotIKApp.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-* This file is part of ArmarX.
-*
-* ArmarX is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License version 2 as
-* published by the Free Software Foundation.
-*
-* ArmarX is distributed in the hope that it will be useful, but
-* WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-* @package    RobotAPI::RobotIK
-* @author     ( joshua dot haustein at gmail dot com)
-* @date       2015
-* @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
-*             GNU General Public License
-*/
-
-
-
-#include <ArmarXCore/core/application/Application.h>
-#include <RobotAPI/components/RobotIK/RobotIK.h>
-
-namespace armarx
-{
-    /**
-     * Application for testing armarx::RobotIK
-     */
-    class RobotIKApp :
-        virtual public armarx::Application
-    {
-        /**
-         * @see armarx::Application::setup()
-         */
-        void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties)
-        {
-            auto iksolver = Component::create<RobotIK>(properties);
-            registry->addObject(iksolver);
-        }
-    };
-}
diff --git a/source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/main.cpp b/source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/main.cpp
deleted file mode 100644
index f2b1b052b..000000000
--- a/source/RobotAPI/applications/moved_to_robotcomponents_RobotIK/main.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is part of ArmarX.
- *
- * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
- *
- * ArmarX is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * ArmarX is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * @package    RobotAPI::applications::RobotIK
- * @author     Joshua Haustein
- * @date       2015
- * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
- *             GNU General Public License
- */
-
-#include "RobotIKApp.h"
-#include <ArmarXCore/core/logging/Logging.h>
-
-int main(int argc, char* argv[])
-{
-    armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::RobotIKApp>();
-    app->setName("RobotIK");
-
-    return app->main(argc, argv);
-}
diff --git a/source/RobotAPI/components/CyberGloveObserver/CMakeLists.txt b/source/RobotAPI/components/CyberGloveObserver/CMakeLists.txt
index c35dce662..10645a37c 100644
--- a/source/RobotAPI/components/CyberGloveObserver/CMakeLists.txt
+++ b/source/RobotAPI/components/CyberGloveObserver/CMakeLists.txt
@@ -1,24 +1,5 @@
 armarx_component_set_name("CyberGloveObserver")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore RobotAPICore ArmarXCoreObservers)
-
-set(SOURCES
-./CyberGloveObserver.cpp
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp
-)
-set(HEADERS
-./CyberGloveObserver.h
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h
-)
-
+set(COMPONENT_LIBS ArmarXCore RobotAPICore ArmarXCoreObservers)
+set(SOURCES CyberGloveObserver.cpp)
+set(HEADERS CyberGloveObserver.h)
 armarx_add_component("${SOURCES}" "${HEADERS}")
-
diff --git a/source/RobotAPI/components/DebugDrawer/CMakeLists.txt b/source/RobotAPI/components/DebugDrawer/CMakeLists.txt
index 171043962..131cc850c 100644
--- a/source/RobotAPI/components/DebugDrawer/CMakeLists.txt
+++ b/source/RobotAPI/components/DebugDrawer/CMakeLists.txt
@@ -1,22 +1,6 @@
 armarx_component_set_name("DebugDrawer")
 
-find_package(Eigen3 QUIET)
-find_package(Simox QUIET)
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-if (Eigen3_FOUND AND Simox_FOUND)
-    setupSimoxExternalLibraries()
-    include_directories(${Simox_INCLUDE_DIRS})
-    include_directories(SYSTEM ${Simox_EXTERNAL_INCLUDE_DIRS})
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-
-    add_definitions(${Simox_EXTERNAL_LIBRARY_FLAGS})
-
-endif()
-
-set(COMPONENT_LIBS ArmarXCore RobotAPIInterfaces RobotAPICore ${Simox_LIBRARIES})
+set(COMPONENT_LIBS ArmarXCore RobotAPIInterfaces RobotAPICore)
 
 set(SOURCES
     DebugDrawerComponent.cpp
@@ -28,6 +12,4 @@ set(HEADERS
     DebugDrawerUtils.h
     )
 
-
 armarx_add_component("${SOURCES}" "${HEADERS}")
-
diff --git a/source/RobotAPI/components/DummyTextToSpeech/CMakeLists.txt b/source/RobotAPI/components/DummyTextToSpeech/CMakeLists.txt
index 0916bea6b..b8f01d786 100644
--- a/source/RobotAPI/components/DummyTextToSpeech/CMakeLists.txt
+++ b/source/RobotAPI/components/DummyTextToSpeech/CMakeLists.txt
@@ -1,25 +1,7 @@
 armarx_component_set_name("DummyTextToSpeech")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore RobotAPIInterfaces)
-
-set(SOURCES
-./DummyTextToSpeech.cpp
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp
-)
-set(HEADERS
-./DummyTextToSpeech.h
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h
-)
-
+set(COMPONENT_LIBS ArmarXCore RobotAPIInterfaces)
+set(SOURCES DummyTextToSpeech.cpp)
+set(HEADERS DummyTextToSpeech.h)
 armarx_add_component("${SOURCES}" "${HEADERS}")
 
 # add unit tests
diff --git a/source/RobotAPI/components/EarlyVisionGraph/CMakeLists.txt b/source/RobotAPI/components/EarlyVisionGraph/CMakeLists.txt
index 3734e59c6..b12677c3f 100644
--- a/source/RobotAPI/components/EarlyVisionGraph/CMakeLists.txt
+++ b/source/RobotAPI/components/EarlyVisionGraph/CMakeLists.txt
@@ -1,15 +1,7 @@
 armarx_component_set_name("EarlyVisionGraph")
 
-
 find_package(Eigen3 QUIET)
 armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-if(Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
-
-set(COMPONENT_LIBS "")
-
 
 set(SOURCES
 ./MathTools.cpp
@@ -33,4 +25,7 @@ set(HEADERS
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 ")
 
 armarx_add_component("${SOURCES}" "${HEADERS}")
+if(Eigen3_FOUND)
+    target_include_directories(EarlyVisionGraph SYSTEM PUBLIC ${Eigen3_INCLUDE_DIR})
+endif()
 
diff --git a/source/RobotAPI/components/KITProstheticHandObserver/CMakeLists.txt b/source/RobotAPI/components/KITProstheticHandObserver/CMakeLists.txt
index da305f17b..70ab6d0ff 100644
--- a/source/RobotAPI/components/KITProstheticHandObserver/CMakeLists.txt
+++ b/source/RobotAPI/components/KITProstheticHandObserver/CMakeLists.txt
@@ -1,25 +1,7 @@
 armarx_component_set_name("KITProstheticHandObserver")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore)
-
-set(SOURCES
-./KITProstheticHandObserver.cpp
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp
-)
-set(HEADERS
-./KITProstheticHandObserver.h
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h
-)
-
+set(COMPONENT_LIBS ArmarXCore)
+set(SOURCES KITProstheticHandObserver.cpp)
+set(HEADERS KITProstheticHandObserver.h)
 armarx_add_component("${SOURCES}" "${HEADERS}")
 
 # add unit tests
diff --git a/source/RobotAPI/components/RobotHealthDummy/CMakeLists.txt b/source/RobotAPI/components/RobotHealthDummy/CMakeLists.txt
index bed60d0dd..b0e2dc258 100644
--- a/source/RobotAPI/components/RobotHealthDummy/CMakeLists.txt
+++ b/source/RobotAPI/components/RobotHealthDummy/CMakeLists.txt
@@ -1,25 +1,7 @@
 armarx_component_set_name("RobotHealthDummy")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore)
-
-set(SOURCES
-./RobotHealthDummy.cpp
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp
-)
-set(HEADERS
-./RobotHealthDummy.h
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h
-)
-
+set(COMPONENT_LIBS ArmarXCore)
+set(SOURCES RobotHealthDummy.cpp)
+set(HEADERS RobotHealthDummy.h)
 armarx_add_component("${SOURCES}" "${HEADERS}")
 
 # add unit tests
diff --git a/source/RobotAPI/components/RobotNameService/CMakeLists.txt b/source/RobotAPI/components/RobotNameService/CMakeLists.txt
index f21720c68..3a7f08440 100644
--- a/source/RobotAPI/components/RobotNameService/CMakeLists.txt
+++ b/source/RobotAPI/components/RobotNameService/CMakeLists.txt
@@ -1,25 +1,7 @@
 armarx_component_set_name("RobotNameService")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore)
-
-set(SOURCES
-./RobotNameService.cpp
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp
-)
-set(HEADERS
-./RobotNameService.h
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h
-)
-
+set(COMPONENT_LIBS ArmarXCore)
+set(SOURCES RobotNameService.cpp)
+set(HEADERS RobotNameService.h)
 armarx_add_component("${SOURCES}" "${HEADERS}")
 
 # add unit tests
diff --git a/source/RobotAPI/components/RobotState/CMakeLists.txt b/source/RobotAPI/components/RobotState/CMakeLists.txt
index 51a95e693..d4210b240 100644
--- a/source/RobotAPI/components/RobotState/CMakeLists.txt
+++ b/source/RobotAPI/components/RobotState/CMakeLists.txt
@@ -1,15 +1,5 @@
 armarx_set_target("RobotAPI Library: RobotStateComponent")
 
-find_package(Eigen3 QUIET)
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-if(Eigen3_FOUND AND Simox_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-    include_directories(${Simox_INCLUDE_DIRS})
-endif()
-
 set(LIB_NAME       RobotAPIRobotStateComponent)
 
 set(LIBS ArmarXCore RobotAPICore)
diff --git a/source/RobotAPI/components/ViewSelection/CMakeLists.txt b/source/RobotAPI/components/ViewSelection/CMakeLists.txt
index ba3a6b8df..ecad234c2 100644
--- a/source/RobotAPI/components/ViewSelection/CMakeLists.txt
+++ b/source/RobotAPI/components/ViewSelection/CMakeLists.txt
@@ -1,17 +1,8 @@
 armarx_component_set_name("ViewSelection")
 
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-if(Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
-
 set(COMPONENT_LIBS
     RobotAPIInterfaces RobotAPICore EarlyVisionGraph
     ArmarXCoreInterfaces ArmarXCore ArmarXCoreStatechart ArmarXCoreObservers
-    ${Simox_LIBRARIES}
 )
 
 set(SOURCES ViewSelection.cpp)
@@ -19,5 +10,3 @@ set(HEADERS ViewSelection.h)
 
 armarx_add_component("${SOURCES}" "${HEADERS}")
 
-# add unit tests
-#add_subdirectory(test)
diff --git a/source/RobotAPI/components/units/CMakeLists.txt b/source/RobotAPI/components/units/CMakeLists.txt
index ea60cffcb..a8fa129b5 100644
--- a/source/RobotAPI/components/units/CMakeLists.txt
+++ b/source/RobotAPI/components/units/CMakeLists.txt
@@ -1,23 +1,11 @@
 armarx_set_target("RobotAPI Units Library: RobotAPIUnits")
 
-find_package(Eigen3 QUIET)
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-if (Eigen3_FOUND AND Simox_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(LIB_NAME       RobotAPIUnits)
 
 set(LIBS
     RobotAPICore
     ArmarXCoreObservers
     ArmarXCoreEigen3Variants
-    ${Simox_LIBRARIES}
 )
 
 set(LIB_HEADERS
diff --git a/source/RobotAPI/components/units/RobotUnit/CMakeLists.txt b/source/RobotAPI/components/units/RobotUnit/CMakeLists.txt
index 7c0c849c4..397d386f4 100644
--- a/source/RobotAPI/components/units/RobotUnit/CMakeLists.txt
+++ b/source/RobotAPI/components/units/RobotUnit/CMakeLists.txt
@@ -3,21 +3,11 @@ set(LIB_NAME       RobotUnit)
 armarx_component_set_name("${LIB_NAME}")
 armarx_set_target("Library: ${LIB_NAME}")
 
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-if (Simox_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-endif()
-
 set(LIBS
-        ArmarXCoreInterfaces
-        ArmarXCore
         EmergencyStop
         ArmarXGuiInterfaces
         RobotAPIUnits
-        RobotAPIInterfaces
         DefaultWidgetDescriptions
-        ${Simox_LIBRARIES}
 )
 
 set(LIB_FILES
@@ -211,9 +201,6 @@ list_to_string(RobotUnitModules "," ${RobotUnitModules})
 message(STATUS "collected these names for RobotUnitModules: ${RobotUnitModules}")
 #done detecting modules!
 ###########################################################################
-
-
-
 add_subdirectory(test)
 
 armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
diff --git a/source/RobotAPI/drivers/KITProsthesisIceDriver/CMakeLists.txt b/source/RobotAPI/drivers/KITProsthesisIceDriver/CMakeLists.txt
new file mode 100644
index 000000000..707524b63
--- /dev/null
+++ b/source/RobotAPI/drivers/KITProsthesisIceDriver/CMakeLists.txt
@@ -0,0 +1,13 @@
+#requires the Packages libqt5bluetooth5 qtconnectivity5-dev
+set(LIB_NAME    KITProsthesisIceDriver)
+
+armarx_component_set_name("${LIB_NAME}")
+armarx_set_target("Library: ${LIB_NAME}")
+
+set(LIBS ArmarXCoreObservers RobotAPICore KITProstheticHandDriver)
+set(LIB_FILES   KITProsthesisIceDriver.cpp)
+set(LIB_HEADERS KITProsthesisIceDriver.h)
+
+armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
+
+add_subdirectory(example)
diff --git a/source/RobotAPI/drivers/KITProstheticHandDriver/CMakeLists.txt b/source/RobotAPI/drivers/KITProstheticHandDriver/CMakeLists.txt
index e70462472..8de0ac264 100644
--- a/source/RobotAPI/drivers/KITProstheticHandDriver/CMakeLists.txt
+++ b/source/RobotAPI/drivers/KITProstheticHandDriver/CMakeLists.txt
@@ -10,13 +10,7 @@ set(CMAKE_AUTOMOC ON)
 
 armarx_build_if(Qt5_FOUND "Qt5 Core or Bluetooth not available")
 
-set(LIBS
-    ${Qt5Core_LIBRARIES}
-    ${Qt5Bluetooth_LIBRARIES}
-)
-
-include_directories(SYSTEM ${Qt5Core_INCLUDE_DIRS})
-include_directories(SYSTEM ${Qt5Bluetooth_INCLUDE_DIRS})
+set(LIBS ${Qt5Core_LIBRARIES} ${Qt5Bluetooth_LIBRARIES})
 
 set(LIB_FILES
     BLEProthesisInterface.cpp
@@ -31,5 +25,8 @@ set(LIB_HEADERS
 )
 
 armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
+target_include_directories("${LIB_NAME}" SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
+target_include_directories("${LIB_NAME}" SYSTEM PUBLIC ${Qt5Bluetooth_INCLUDE_DIRS})
+
 
 add_subdirectory(example)
diff --git a/source/RobotAPI/drivers/OptoForce/CMakeLists.txt b/source/RobotAPI/drivers/OptoForce/CMakeLists.txt
index 2c0c55d65..8032e5e40 100644
--- a/source/RobotAPI/drivers/OptoForce/CMakeLists.txt
+++ b/source/RobotAPI/drivers/OptoForce/CMakeLists.txt
@@ -3,16 +3,15 @@ armarx_component_set_name("OptoForce")
 find_package(OptoForceOMD QUIET)
 armarx_build_if(OptoForceOMD_FOUND "OptoForceOMD not available 11elf!")
 
-if(OptoForceOMD_FOUND)
-    include_directories(SYSTEM ${OptoForceOMD_INCLUDE_DIR})
-endif()
-
-set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore OMD)
-
+set(COMPONENT_LIBS ArmarXCore OMD)
 set(SOURCES OptoForce.cpp)
 set(HEADERS OptoForce.h)
 
 armarx_add_component("${SOURCES}" "${HEADERS}")
 
+if(OptoForceOMD_FOUND)
+    target_include_directories(OptoForce SYSTEM PUBLIC ${OptoForceOMD_INCLUDE_DIR})
+endif()
+
 # add unit tests
 add_subdirectory(test)
diff --git a/source/RobotAPI/drivers/OptoForceUnit/CMakeLists.txt b/source/RobotAPI/drivers/OptoForceUnit/CMakeLists.txt
index c615e70bb..9fec62057 100644
--- a/source/RobotAPI/drivers/OptoForceUnit/CMakeLists.txt
+++ b/source/RobotAPI/drivers/OptoForceUnit/CMakeLists.txt
@@ -3,10 +3,6 @@ armarx_component_set_name("OptoForceUnit")
 find_package(OptoForceOMD QUIET)
 armarx_build_if(OptoForceOMD_FOUND "OptoForceOMD not available")
 
-if(OptoForceOMD_FOUND)
-    include_directories(SYSTEM ${OptoForceOMD_INCLUDE_DIR})
-endif()
-
 set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore ArmarXCoreEigen3Variants RobotAPIInterfaces ${OptoForceOMD_LIBRARIES})
 
 set(SOURCES OptoForceUnit.cpp)
@@ -14,5 +10,8 @@ set(HEADERS OptoForceUnit.h)
 
 armarx_add_component("${SOURCES}" "${HEADERS}")
 
+if(OptoForceOMD_FOUND)
+    target_include_directories(OptoForceUnit SYSTEM PUBLIC ${OptoForceOMD_INCLUDE_DIR})
+endif()
 # add unit tests
 add_subdirectory(test)
diff --git a/source/RobotAPI/drivers/OrientedTactileSensor/CMakeLists.txt b/source/RobotAPI/drivers/OrientedTactileSensor/CMakeLists.txt
index 597ae3971..8db77f687 100644
--- a/source/RobotAPI/drivers/OrientedTactileSensor/CMakeLists.txt
+++ b/source/RobotAPI/drivers/OrientedTactileSensor/CMakeLists.txt
@@ -1,22 +1,9 @@
 armarx_set_target("OrientedTactileSensor Library: OrientedTactileSensor")
 
-find_package(Eigen3 QUIET)
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-
-if (Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(LIB_NAME       OrientedTactileSensor)
-
 set(LIBS SimpleJsonLogger RobotAPIUnits ArmarXCoreObservers ArmarXCoreEigen3Variants)
 
-set(LIB_FILES
-    OrientedTactileSensorUnit.cpp
-)
-set(LIB_HEADERS
-   OrientedTactileSensorUnit.h
-)
+set(LIB_FILES OrientedTactileSensorUnit.cpp)
+set(LIB_HEADERS OrientedTactileSensorUnit.h)
 
 armarx_add_library("${LIB_NAME}"  "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
diff --git a/source/RobotAPI/drivers/WeissHapticSensor/CMakeLists.txt b/source/RobotAPI/drivers/WeissHapticSensor/CMakeLists.txt
index 4915a9c94..41721a187 100644
--- a/source/RobotAPI/drivers/WeissHapticSensor/CMakeLists.txt
+++ b/source/RobotAPI/drivers/WeissHapticSensor/CMakeLists.txt
@@ -1,13 +1,5 @@
 armarx_set_target("WeissHapticSensor Library: WeissHapticSensor")
 
-find_package(Eigen3 QUIET)
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-
-if (Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(LIB_NAME       WeissHapticSensor)
 
 set(LIBS RobotAPIUnits ArmarXCoreObservers ArmarXCoreEigen3Variants)
diff --git a/source/RobotAPI/gui-plugins/GuiHealthClient/CMakeLists.txt b/source/RobotAPI/gui-plugins/GuiHealthClient/CMakeLists.txt
index 701540787..014e63bff 100644
--- a/source/RobotAPI/gui-plugins/GuiHealthClient/CMakeLists.txt
+++ b/source/RobotAPI/gui-plugins/GuiHealthClient/CMakeLists.txt
@@ -1,39 +1,14 @@
-
 armarx_set_target("GuiHealthClientGuiPlugin")
 
-# most qt components will be linked against in the call armarx_gui_library
-#armarx_find_qt(QtCore QtGui QtDesigner)
-
-# ArmarXGui gets included through depends_on_armarx_package(ArmarXGui "OPTIONAL")
-# in the toplevel CMakeLists.txt
 armarx_build_if(ArmarXGui_FOUND "ArmarXGui not available")
 
-
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(Xyz_FOUND)
-#    include(${Xyz_INCLUDE_DIRECTORIES})
-#endif()
-
-set(SOURCES
-./GuiHealthClientGuiPlugin.cpp ./GuiHealthClientWidgetController.cpp
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@GuiPlugin.cpp @COMPONENT_PATH@/@COMPONENT_NAME@WidgetController.cpp
-)
-
-# do not rename this variable, it is used in armarx_gui_library()...
-set(HEADERS
-./GuiHealthClientGuiPlugin.h ./GuiHealthClientWidgetController.h
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@GuiPlugin.h @COMPONENT_PATH@/@COMPONENT_NAME@WidgetController.h
-)
+set(SOURCES GuiHealthClientGuiPlugin.cpp GuiHealthClientWidgetController.cpp)
+set(HEADERS GuiHealthClientGuiPlugin.h   GuiHealthClientWidgetController.h)
 
 set(GUI_MOC_HDRS ${HEADERS})
 
-set(GUI_UIS
-./GuiHealthClientWidget.ui
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@Widget.ui
-)
+set(GUI_UIS GuiHealthClientWidget.ui)
 
-# Add more libraries you depend on here, e.g. ${QT_LIBRARIES}.
 set(COMPONENT_LIBS RobotAPIInterfaces)
 
 if(ArmarXGui_FOUND)
diff --git a/source/RobotAPI/gui-plugins/HandUnitPlugin/CMakeLists.txt b/source/RobotAPI/gui-plugins/HandUnitPlugin/CMakeLists.txt
index 9b5f0e07a..ea8cc803a 100644
--- a/source/RobotAPI/gui-plugins/HandUnitPlugin/CMakeLists.txt
+++ b/source/RobotAPI/gui-plugins/HandUnitPlugin/CMakeLists.txt
@@ -1,9 +1,5 @@
 armarx_set_target("HandUnitGuiPlugin")
 
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-
-armarx_build_if(Simox_FOUND "Simox not available")
-
 set(SOURCES HandUnitGuiPlugin.cpp
      HandUnitConfigDialog.cpp)
 set(HEADERS HandUnitGuiPlugin.h
@@ -19,8 +15,8 @@ set(GUI_UIS
     HandUnitConfigDialog.ui
 )
 
-set(COMPONENT_LIBS RobotAPIUnits ArmarXCoreInterfaces ${Simox_LIBRARIES})
+set(COMPONENT_LIBS RobotAPIUnits)
 
 if (ArmarXGui_FOUND)
-	armarx_gui_library(HandUnitGuiPlugin "${SOURCES}" "${GUI_MOC_HDRS}" "${GUI_UIS}" "" "${COMPONENT_LIBS}" )
+    armarx_gui_library(HandUnitGuiPlugin "${SOURCES}" "${GUI_MOC_HDRS}" "${GUI_UIS}" "" "${COMPONENT_LIBS}" )
 endif()
diff --git a/source/RobotAPI/gui-plugins/HapticUnitPlugin/CMakeLists.txt b/source/RobotAPI/gui-plugins/HapticUnitPlugin/CMakeLists.txt
index b8d194541..e69d153a1 100644
--- a/source/RobotAPI/gui-plugins/HapticUnitPlugin/CMakeLists.txt
+++ b/source/RobotAPI/gui-plugins/HapticUnitPlugin/CMakeLists.txt
@@ -1,15 +1,5 @@
 armarx_set_target("HapticUnitUnitGuiPlugin")
 
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-
-armarx_build_if(Simox_FOUND "Simox not available")
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-if(Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(SOURCES
     HapticUnitGuiPlugin.cpp
     HapticUnitConfigDialog.cpp
@@ -37,7 +27,7 @@ set(GUI_UIS
     MatrixDisplayWidget.ui
 )
 
-set(COMPONENT_LIBS RobotAPIUnits ArmarXCoreInterfaces ArmarXCoreEigen3Variants ${Simox_LIBRARIES})
+set(COMPONENT_LIBS RobotAPIUnits ArmarXCoreInterfaces ArmarXCoreEigen3Variants)
 
 if (ArmarXGui_FOUND)
 	armarx_gui_library(HapticUnitGuiPlugin "${SOURCES}" "${GUI_MOC_HDRS}" "${GUI_UIS}" "" "${COMPONENT_LIBS}" )
diff --git a/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/CMakeLists.txt b/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/CMakeLists.txt
index e20e7bf93..8957d94e4 100644
--- a/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/CMakeLists.txt
+++ b/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/CMakeLists.txt
@@ -2,16 +2,6 @@ armarx_set_target("HomogeneousMatrixCalculatorGuiPlugin")
 
 armarx_build_if(Simox_FOUND "VirtualRobot not available")
 
-if(Simox_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-endif()
-
-find_package(Eigen3 QUIET)
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-if(Eigen3_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(SOURCES
     HomogeneousMatrixCalculatorGuiPlugin.cpp
     HomogeneousMatrixCalculatorWidgetController.cpp
@@ -29,6 +19,6 @@ set(GUI_RCS icons.qrc)
 set(COMPONENT_LIBS VirtualRobot)
 
 if(ArmarXGui_FOUND)
-        install(DIRECTORY icons/ DESTINATION share/${PROJECT_NAME} COMPONENT data)
-        armarx_gui_library(HomogeneousMatrixCalculatorGuiPlugin "${SOURCES}" "${GUI_MOC_HDRS}" "${GUI_UIS}" "${GUI_RCS}" "${COMPONENT_LIBS}")
+    install(DIRECTORY icons/ DESTINATION share/${PROJECT_NAME} COMPONENT data)
+    armarx_gui_library(HomogeneousMatrixCalculatorGuiPlugin "${SOURCES}" "${GUI_MOC_HDRS}" "${GUI_UIS}" "${GUI_RCS}" "${COMPONENT_LIBS}")
 endif()
diff --git a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/CMakeLists.txt b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/CMakeLists.txt
index 8af30824f..a4bb4d600 100644
--- a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/CMakeLists.txt
+++ b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/CMakeLists.txt
@@ -1,23 +1,11 @@
 armarx_set_target("KinematicUnitGuiPlugin")
-find_package(Eigen3 QUIET)
-
-# VirtualRobot (adds dependencies to COin3D and SoQt)
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "VirtualRobot not available")
-
-if(Eigen3_FOUND AND Simox_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-    include_directories(${Simox_INCLUDE_DIRS})
-endif()
 
 set(SOURCES KinematicUnitGuiPlugin.cpp KinematicUnitConfigDialog.cpp)
 set(HEADERS KinematicUnitGuiPlugin.h KinematicUnitConfigDialog.h)
 set(GUI_MOC_HDRS KinematicUnitGuiPlugin.h KinematicUnitConfigDialog.h)
 set(GUI_UIS kinematicunitguiplugin.ui KinematicUnitConfigDialog.ui)
 
-set(COMPONENT_LIBS RobotAPIUnits DebugDrawer ${Simox_LIBRARIES})
+set(COMPONENT_LIBS RobotAPIUnits DebugDrawer)
 
 if (ArmarXGui_FOUND)
 	armarx_gui_library(KinematicUnitGuiPlugin "${SOURCES}" "${GUI_MOC_HDRS}" "${GUI_UIS}" "" "${COMPONENT_LIBS}" )
diff --git a/source/RobotAPI/gui-plugins/PlatformUnitPlugin/CMakeLists.txt b/source/RobotAPI/gui-plugins/PlatformUnitPlugin/CMakeLists.txt
index 518ddce30..8daffd40b 100644
--- a/source/RobotAPI/gui-plugins/PlatformUnitPlugin/CMakeLists.txt
+++ b/source/RobotAPI/gui-plugins/PlatformUnitPlugin/CMakeLists.txt
@@ -1,14 +1,11 @@
 armarx_set_target("PlatformUnitGuiPlugin")
 
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-armarx_build_if(Simox_FOUND "Simox not available")
-
 set(SOURCES PlatformUnitGuiPlugin.cpp PlatformUnitConfigDialog.cpp)
 set(HEADERS PlatformUnitGuiPlugin.h PlatformUnitConfigDialog.h)
 set(GUI_MOC_HDRS PlatformUnitGuiPlugin.h PlatformUnitConfigDialog.h)
 set(GUI_UIS PlatformUnitGuiPlugin.ui PlatformUnitConfigDialog.ui)
 
-set(COMPONENT_LIBS RobotAPIUnits ArmarXCoreInterfaces ${Simox_LIBRARIES})
+set(COMPONENT_LIBS RobotAPIUnits)
 
 if (ArmarXGui_FOUND)
 	armarx_gui_library(PlatformUnitGuiPlugin "${SOURCES}" "${GUI_MOC_HDRS}" "${GUI_UIS}" "" "${COMPONENT_LIBS}" )
diff --git a/source/RobotAPI/gui-plugins/RobotViewerPlugin/CMakeLists.txt b/source/RobotAPI/gui-plugins/RobotViewerPlugin/CMakeLists.txt
index b1e96da0a..66c03b070 100644
--- a/source/RobotAPI/gui-plugins/RobotViewerPlugin/CMakeLists.txt
+++ b/source/RobotAPI/gui-plugins/RobotViewerPlugin/CMakeLists.txt
@@ -1,24 +1,11 @@
 armarx_set_target("RobotViewerGuiPlugin")
 
-find_package(Eigen3 QUIET)
-
-# VirtualRobot (adds dependencies to COin3D and SoQt)
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "VirtualRobot not available")
-
-if(Eigen3_FOUND AND Simox_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-    include_directories(${Simox_INCLUDE_DIRS})
-endif()
-
 set(SOURCES      RobotViewerGuiPlugin.cpp)
 set(HEADERS      RobotViewerGuiPlugin.h)
 set(GUI_MOC_HDRS RobotViewerGuiPlugin.h)
 set(GUI_UIS      RobotViewerGuiPlugin.ui)
 
-set(COMPONENT_LIBS RobotAPIUnits DebugDrawer SimpleConfigDialog StructuralJson ${Simox_LIBRARIES})
+set(COMPONENT_LIBS RobotAPIUnits DebugDrawer SimpleConfigDialog StructuralJson)
 
 if (ArmarXGui_FOUND)
         armarx_gui_library(RobotViewerGuiPlugin "${SOURCES}" "${GUI_MOC_HDRS}" "${GUI_UIS}" "" "${COMPONENT_LIBS}" )
diff --git a/source/RobotAPI/gui-plugins/SensorActorWidgetsPlugin/CMakeLists.txt b/source/RobotAPI/gui-plugins/SensorActorWidgetsPlugin/CMakeLists.txt
index a9eb9a8d5..249bcb561 100644
--- a/source/RobotAPI/gui-plugins/SensorActorWidgetsPlugin/CMakeLists.txt
+++ b/source/RobotAPI/gui-plugins/SensorActorWidgetsPlugin/CMakeLists.txt
@@ -3,22 +3,9 @@ armarx_set_target("SensorActorWidgetsGuiPlugin")
 find_package(qwt QUIET)
 find_package(jsoncpp QUIET)
 
-find_package(Eigen3 QUIET)
-# VirtualRobot
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-
 armarx_build_if(qwt_FOUND "Qwt not available")
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "VirtualRobot not available")
 armarx_build_if(jsoncpp_FOUND "jsoncpp not available")
 
-if (qwt_FOUND AND Eigen3_FOUND AND Simox_FOUND AND jsoncpp_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-    include_directories(SYSTEM ${qwt_INCLUDE_DIR})
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-    include_directories(SYSTEM ${jsoncpp_INCLUDE_DIR})
-endif()
-
 set(SOURCES
     SensorActorWidgetsPlugin.cpp
     ArmarXTCPMover/TCPMover.cpp
@@ -43,8 +30,12 @@ set(GUI_UIS
     ArmarXTCPMover/TCPMoverConfigDialog.ui
 )
 
-set(COMPONENT_LIBS RobotAPIUnits ArmarXCoreObservers RobotAPIInterfaces ${Simox_LIBRARIES})
+set(COMPONENT_LIBS RobotAPIUnits ArmarXCoreObservers RobotAPIInterfaces)
 
 if (ArmarXGui_FOUND)
 	armarx_gui_library(SensorActorWidgetsGuiPlugin "${SOURCES}" "${GUI_MOC_HDRS}" "${GUI_UIS}" "" "${COMPONENT_LIBS}" )
+        if (qwt_FOUND AND jsoncpp_FOUND)
+            target_include_directories(SensorActorWidgetsGuiPlugin SYSTEM PUBLIC ${qwt_INCLUDE_DIR})
+            target_include_directories(SensorActorWidgetsGuiPlugin SYSTEM PUBLIC ${jsoncpp_INCLUDE_DIR})
+        endif()
 endif()
diff --git a/source/RobotAPI/libraries/ArmarXEtherCAT/CMakeLists.txt b/source/RobotAPI/libraries/ArmarXEtherCAT/CMakeLists.txt
index 8837e86ba..f653b4205 100644
--- a/source/RobotAPI/libraries/ArmarXEtherCAT/CMakeLists.txt
+++ b/source/RobotAPI/libraries/ArmarXEtherCAT/CMakeLists.txt
@@ -3,39 +3,10 @@ armarx_set_target("Library: ArmarXEtherCAT")
 
 set(LIB_NAME       ArmarXEtherCAT)
 
-find_package(Eigen3 QUIET)
-find_package(Simox QUIET)
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-if (Eigen3_FOUND AND Simox_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 find_package(SOEM QUIET)
 armarx_build_if(SOEM_FOUND "SOEM not available")
-if (SOEM_FOUND)
-    include_directories(SYSTEM ${SOEM_INCLUDE_DIR})
-endif()
-
-
-set(LIBS
-	ArmarXCoreInterfaces 
-	ArmarXCore
-        RobotUnit
-        ${SOEM_LIBRARIES}
-        ${Simox_LIBRARIES}
-)
-
-if(ARMARX_USE_QT5)
-    #someone gets qt5::Designer in the link flags!
-    #this is a hotfix for this problem
-    armarx_find_qt(Designer)
-    list(APPEND LIBS ${QT_LIBRARIES})
-endif()
 
+set(LIBS RobotUnit ${SOEM_LIBRARIES})
 
 set(LIB_FILES
     EtherCAT.cpp
@@ -62,5 +33,8 @@ set(LIB_HEADERS
 
 armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
 
+if (SOEM_FOUND)
+    target_include_directories("${LIB_NAME}" SYSTEM PUBLIC ${SOEM_INCLUDE_DIR})
+endif()
 # add unit tests
 add_subdirectory(test)
diff --git a/source/RobotAPI/libraries/DMPController/CMakeLists.txt b/source/RobotAPI/libraries/DMPController/CMakeLists.txt
index 4aa0d2058..1bf626ee8 100644
--- a/source/RobotAPI/libraries/DMPController/CMakeLists.txt
+++ b/source/RobotAPI/libraries/DMPController/CMakeLists.txt
@@ -3,51 +3,32 @@ set(LIB_NAME       DMPController)
 armarx_component_set_name("${LIB_NAME}")
 armarx_set_target("Library: ${LIB_NAME}")
 
-
-
-find_package(Eigen3 QUIET)
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
 find_package(DMP QUIET)
 find_package(IVT QUIET)
 find_package(MMMCore QUIET)
 find_package(MMMTools QUIET)
 
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
 armarx_build_if(DMP_FOUND "DMP not available")
 
-if (Eigen3_FOUND AND Simox_FOUND AND DMP_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-    include_directories(${DMP_INCLUDE_DIRS})
-endif()
 
 set(LIBS
-    ArmarXCoreInterfaces
-    ArmarXCore
-    RobotAPIInterfaces
     ArmarXCoreObservers
     ArmarXCoreStatechart
     ArmarXCoreEigen3Variants
     VirtualRobot
-    Saba
-    SimDynamics
     RobotUnit
     ${DMP_LIBRARIES}
     )
 
-set(LIB_FILES
-./TaskSpaceDMPController.cpp
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp
-)
-set(LIB_HEADERS
-./TaskSpaceDMPController.h
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h
-)
+set(LIB_FILES   TaskSpaceDMPController.cpp)
+set(LIB_HEADERS TaskSpaceDMPController.h)
 
 
 armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
 
+if (DMP_FOUND)
+    target_include_directories("${LIB_NAME}" PUBLIC ${DMP_INCLUDE_DIRS})
+endif()
+
 # add unit tests
 add_subdirectory(test)
diff --git a/source/RobotAPI/libraries/RobotAPINJointControllers/CMakeLists.txt b/source/RobotAPI/libraries/RobotAPINJointControllers/CMakeLists.txt
index 20ceef74b..b7a74584a 100644
--- a/source/RobotAPI/libraries/RobotAPINJointControllers/CMakeLists.txt
+++ b/source/RobotAPI/libraries/RobotAPINJointControllers/CMakeLists.txt
@@ -3,28 +3,14 @@ set(LIB_NAME       RobotAPINJointControllers)
 armarx_component_set_name("${LIB_NAME}")
 armarx_set_target("Library: ${LIB_NAME}")
 
-find_package(Eigen3 QUIET)
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
 find_package(DMP QUIET)
 find_package(MMMCore QUIET)
 find_package(MMMTools QUIET)
 
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
 armarx_build_if(DMP_FOUND "DMP not available")
 
-
-if (Eigen3_FOUND AND Simox_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(LIBS RobotAPIInterfaces ArmarXCoreObservers ArmarXCoreStatechart ArmarXCoreEigen3Variants
-    VirtualRobot
-    Saba
-    SimDynamics
     RobotUnit
-
     )
 
 set(LIB_FILES
@@ -38,8 +24,6 @@ set(LIB_HEADERS
 
     message(STATUS "DMP libraries is ${DMP_LIBRARIES}")
 
-    include_directories(${DMP_INCLUDE_DIRS})
-#    link_directories(${DMP_LIB_DIRS})
 
     list(APPEND LIB_HEADERS
            DMPController/NJointJointSpaceDMPController.h
@@ -65,6 +49,8 @@ set(LIB_HEADERS
     list(APPEND LIBS ${DMP_LIBRARIES} DMPController)
 
 armarx_add_library("${LIB_NAME}"  "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
-
+if(DMP_FOUND)
+    target_include_directories("${LIB_NAME}" PUBLIC ${DMP_INCLUDE_DIRS})
+endif()
 # add unit tests
 add_subdirectory(test)
diff --git a/source/RobotAPI/libraries/RobotStatechartHelpers/CMakeLists.txt b/source/RobotAPI/libraries/RobotStatechartHelpers/CMakeLists.txt
index 6202780fa..f52b52216 100644
--- a/source/RobotAPI/libraries/RobotStatechartHelpers/CMakeLists.txt
+++ b/source/RobotAPI/libraries/RobotStatechartHelpers/CMakeLists.txt
@@ -3,44 +3,24 @@ set(LIB_NAME       RobotStatechartHelpers)
 armarx_component_set_name("${LIB_NAME}")
 armarx_set_target("Library: ${LIB_NAME}")
 
-
-find_package(Eigen3 QUIET)
-find_package(Simox QUIET)
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-if (Eigen3_FOUND AND Simox_FOUND)
-    include_directories(
-        ${Eigen3_INCLUDE_DIR}
-        ${Simox_INCLUDE_DIRS}
-    )
-endif()
-
 set(COMPONENT_LIBS
     ArmarXCoreInterfaces ArmarXCore ArmarXCoreObservers ArmarXCoreStatechart
     RobotAPIInterfaces RobotAPICore
-    ${Simox_LIBRARIES}
 )
 
 set(LIB_FILES
-#./RobotStatechartHelpers.cpp
 VelocityControllerHelper.cpp
 PositionControllerHelper.cpp
 ForceTorqueHelper.cpp
 KinematicUnitHelper.cpp
 RobotNameHelper.cpp
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp
 )
 set(LIB_HEADERS
-#./RobotStatechartHelpers.h
 VelocityControllerHelper.h
 PositionControllerHelper.h
 ForceTorqueHelper.h
 KinematicUnitHelper.h
 RobotNameHelper.h
-#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h
 )
 
-
 armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${COMPONENT_LIBS}")
diff --git a/source/RobotAPI/libraries/SimpleJsonLogger/CMakeLists.txt b/source/RobotAPI/libraries/SimpleJsonLogger/CMakeLists.txt
index 28e4f5854..3ede2f5d4 100644
--- a/source/RobotAPI/libraries/SimpleJsonLogger/CMakeLists.txt
+++ b/source/RobotAPI/libraries/SimpleJsonLogger/CMakeLists.txt
@@ -3,35 +3,12 @@ armarx_set_target("Library: SimpleJsonLogger")
 
 set(LIB_NAME       SimpleJsonLogger)
 
-find_package(Eigen3 QUIET)
 find_package(Simox QUIET)
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
 armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
 
-if (Eigen3_FOUND AND Simox_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
-set(LIBS
-	ArmarXCoreInterfaces 
-	ArmarXCore
-        StructuralJson
-        ${Simox_LIBRARIES}
-)
-
-if(ARMARX_USE_QT5)
-    #someone gets qt5::Designer in the link flags!
-    #this is a hotfix for this problem
-    armarx_find_qt(Designer)
-    list(APPEND LIBS ${QT_LIBRARIES})
-endif()
-
-
+set(LIBS ArmarXCore StructuralJson VirtualRobot)
 set(LIB_FILES   SimpleJsonLogger.cpp SimpleJsonLoggerEntry.cpp)
 set(LIB_HEADERS SimpleJsonLogger.h   SimpleJsonLoggerEntry.h)
-
 armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
 
 # add unit tests
diff --git a/source/RobotAPI/libraries/core/CMakeLists.txt b/source/RobotAPI/libraries/core/CMakeLists.txt
index de555d6f6..8ecf0ea00 100644
--- a/source/RobotAPI/libraries/core/CMakeLists.txt
+++ b/source/RobotAPI/libraries/core/CMakeLists.txt
@@ -2,22 +2,13 @@ armarx_set_target("RobotAPI Core Library: RobotAPICore")
 
 find_package(Eigen3 QUIET)
 find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-#find_package(DMP QUIET)
 
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
 armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
 
-if (Eigen3_FOUND AND Simox_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(LIB_NAME       RobotAPICore)
 
 set(LIBS RobotAPIInterfaces ArmarXCoreObservers ArmarXCoreStatechart ArmarXCoreEigen3Variants
-    VirtualRobot
-    Saba
-    )
+    VirtualRobot Saba)
 
 set(LIB_FILES
     PIDController.cpp
@@ -91,25 +82,7 @@ set(LIB_HEADERS
     CartesianVelocityControllerWithRamp.h
     EigenHelpers.h
 )
-
-
-#if (DMP_FOUND)
-#    message(STATUS "DMP libraries is ${DMP_LIBRARIES}")
-
-#    include_directories(${DMP_INCLUDE_DIRS})
-#    link_directories(${DMP_LIB_DIRS})
-
-#    list(APPEND LIB_HEADERS
-#           DMPController.h
-#           )
-#    list(APPEND LIB_FILES
-#           DMPController.cpp
-#           )
-
-#    list(APPEND LIBS ${DMP_LIBRARIES})
-#endif ()
-
-
 add_subdirectory(test)
 
 armarx_add_library("${LIB_NAME}"  "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
+
diff --git a/source/RobotAPI/libraries/core/remoterobot/test/CMakeLists.txt b/source/RobotAPI/libraries/core/remoterobot/test/CMakeLists.txt
index 5341c29e0..177d72652 100644
--- a/source/RobotAPI/libraries/core/remoterobot/test/CMakeLists.txt
+++ b/source/RobotAPI/libraries/core/remoterobot/test/CMakeLists.txt
@@ -2,12 +2,12 @@ find_package(jsoncpp QUIET)
 
 armarx_build_if(jsoncpp_FOUND "jsoncpp not available")
 
-if (jsoncpp_FOUND)
-    include_directories(SYSTEM ${jsoncpp_INCLUDE_DIR})
-endif()
 
 
 set(LIBS ${LIBS} RobotAPICore ArmarXCoreJsonObject ${jsoncpp_LIBRARIES})
 
 armarx_add_test(ArmarPoseTest ArmarPoseTest.cpp "${LIBS}")
+if (jsoncpp_FOUND)
+    target_include_directories(ArmarPoseTest SYSTEM PUBLIC ${jsoncpp_INCLUDE_DIR})
+endif()
 
diff --git a/source/RobotAPI/libraries/widgets/CMakeLists.txt b/source/RobotAPI/libraries/widgets/CMakeLists.txt
index 88d07dd50..bd78d50f3 100644
--- a/source/RobotAPI/libraries/widgets/CMakeLists.txt
+++ b/source/RobotAPI/libraries/widgets/CMakeLists.txt
@@ -1,33 +1,24 @@
 armarx_set_target("RobotAPI Library: RobotAPIWidgets")
 
-armarx_find_qt(QtCore QtGui QtDesigner)
 find_package(Coin3D REQUIRED)
-armarx_build_if(Coin3D_FOUND "Coin3D not available")
 find_package(SoQt REQUIRED)
-armarx_build_if(SOQT_FOUND "SoQt not available")
 find_package(jsoncpp QUIET)
+armarx_build_if(Coin3D_FOUND "Coin3D not available")
+armarx_build_if(SOQT_FOUND "SoQt not available")
 armarx_build_if(jsoncpp_FOUND "jsoncpp not available")
-find_package(Simox QUIET)
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-if(Eigen3_FOUND AND Simox_FOUND)
-    include_directories(SYSTEM ${Coin3D_INCLUDE_DIRS})
-    include_directories(${Simox_INCLUDE_DIRS})
-    include_directories(SYSTEM ${SoQt_INCLUDE_DIRS})
-    include_directories(SYSTEM ${jsoncpp_INCLUDE_DIR})
-endif()
 
 set(LIB_NAME       RobotAPIWidgets)
-set(LIBS ArmarXCore RobotAPICore ${QT_LIBRARIES})
+set(LIBS RobotAPICore)
 
 set(LIB_FILES DebugLayerControlWidget.cpp)
-
 set(LIB_HEADERS DebugLayerControlWidget.h)
 set(GUI_UIS DebugLayerControlWidget.ui)
+list(APPEND LIB_HEADERS ${GUI_UIS})
 
-armarx_qt_wrap_cpp(LIB_FILES DebugLayerControlWidget.h)
-armarx_qt_wrap_ui(UI_HEADER ${GUI_UIS})
+armarx_gui_library("${LIB_NAME}"  "${LIB_FILES}" "${LIB_HEADERS}" "" "" "${LIBS}")
 
-list(APPEND LIB_HEADERS ${UI_HEADER})
-
-armarx_add_library("${LIB_NAME}"  "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
+if(Coin3d_FOUND AND SoQt_FOUND AND jsoncpp_FOUND)
+    target_include_directories(${LIB_NAME} SYSTEM PUBLIC ${Coin3D_INCLUDE_DIRS})
+    target_include_directories(${LIB_NAME} SYSTEM PUBLIC ${SoQt_INCLUDE_DIRS}  )
+    target_include_directories(${LIB_NAME} SYSTEM PUBLIC ${jsoncpp_INCLUDE_DIR})
+endif()
diff --git a/source/RobotAPI/statecharts/ForceTorqueUtility/CMakeLists.txt b/source/RobotAPI/statecharts/ForceTorqueUtility/CMakeLists.txt
index de3962643..4c43275e1 100644
--- a/source/RobotAPI/statecharts/ForceTorqueUtility/CMakeLists.txt
+++ b/source/RobotAPI/statecharts/ForceTorqueUtility/CMakeLists.txt
@@ -1,45 +1,6 @@
 armarx_component_set_name("ForceTorqueUtility")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-#find_package(Eigen3 QUIET)
-#find_package(Simox QUIET)
-
-#
-#armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-#armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-#
-#if (Eigen3_FOUND AND Simox_FOUND)
-#    include_directories(
-#        ${Eigen3_INCLUDE_DIR}
-#        ${Simox_INCLUDE_DIRS}
-#    )
-#endif()
-
-set(COMPONENT_LIBS
-    ArmarXCoreInterfaces RobotAPIInterfaces RobotAPICore ${Simox_LIBRARIES}
-    ArmarXCore ArmarXCoreStatechart ArmarXCoreObservers)
-
-# Sources
-
-set(SOURCES
-ForceTorqueUtilityRemoteStateOfferer.cpp
-)
-
-set(HEADERS
-ForceTorqueUtilityRemoteStateOfferer.h
-ForceTorqueUtility.scgxml
-)
-
-# adds all existing state headers and sources to CMake
+set(COMPONENT_LIBS RobotAPICore ArmarXCoreStatechart ArmarXCoreObservers)
+set(SOURCES ForceTorqueUtilityRemoteStateOfferer.cpp)
+set(HEADERS ForceTorqueUtilityRemoteStateOfferer.h ForceTorqueUtility.scgxml)
 armarx_generate_statechart_cmake_lists()
-
 armarx_add_component("${SOURCES}" "${HEADERS}")
diff --git a/source/RobotAPI/statecharts/RobotNameHelperTestGroup/CMakeLists.txt b/source/RobotAPI/statecharts/RobotNameHelperTestGroup/CMakeLists.txt
index fa05832c7..b82699ca2 100644
--- a/source/RobotAPI/statecharts/RobotNameHelperTestGroup/CMakeLists.txt
+++ b/source/RobotAPI/statecharts/RobotNameHelperTestGroup/CMakeLists.txt
@@ -1,45 +1,7 @@
 armarx_component_set_name("RobotNameHelperTestGroup")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-find_package(Eigen3 QUIET)
-find_package(Simox QUIET)
-
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
 armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-
-if (Eigen3_FOUND AND Simox_FOUND)
-    include_directories(
-        ${Eigen3_INCLUDE_DIR}
-        ${Simox_INCLUDE_DIRS}
-    )
-endif()
-
-set(COMPONENT_LIBS
-    ${Simox_LIBRARIES}
-    )
-
-# Sources
-
-set(SOURCES
-RobotNameHelperTestGroupRemoteStateOfferer.cpp
-)
-
-set(HEADERS
-RobotNameHelperTestGroupRemoteStateOfferer.h
-RobotNameHelperTestGroup.scgxml
-)
-
-# adds all existing state headers and sources to CMake
+set(COMPONENT_LIBS VirtualRobot)
+set(SOURCES RobotNameHelperTestGroupRemoteStateOfferer.cpp )
+set(HEADERS RobotNameHelperTestGroupRemoteStateOfferer.h RobotNameHelperTestGroup.scgxml)
 armarx_generate_statechart_cmake_lists()
-
 armarx_add_component("${SOURCES}" "${HEADERS}")
diff --git a/source/RobotAPI/statecharts/SpeechObserverTestGroup/CMakeLists.txt b/source/RobotAPI/statecharts/SpeechObserverTestGroup/CMakeLists.txt
index 633f5fb7f..51f6f0026 100644
--- a/source/RobotAPI/statecharts/SpeechObserverTestGroup/CMakeLists.txt
+++ b/source/RobotAPI/statecharts/SpeechObserverTestGroup/CMakeLists.txt
@@ -1,45 +1,7 @@
 armarx_component_set_name("SpeechObserverTestGroup")
-
-#find_package(MyLib QUIET)
-#armarx_build_if(MyLib_FOUND "MyLib not available")
-#
-# all include_directories must be guarded by if(Xyz_FOUND)
-# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
-#if(MyLib_FOUND)
-#    include_directories(${MyLib_INCLUDE_DIRS})
-#endif()
-
-#find_package(Eigen3 QUIET)
-#find_package(Simox QUIET)
-
-#
-#armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-#armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-#
-#if (Eigen3_FOUND AND Simox_FOUND)
-#    include_directories(
-#        ${Eigen3_INCLUDE_DIR}
-#        ${Simox_INCLUDE_DIRS}
-#    )
-#endif()
-
-set(COMPONENT_LIBS
-   ArmarXCoreInterfaces RobotAPIInterfaces RobotAPICore ${Simox_LIBRARIES}
-   ArmarXCore ArmarXCoreStatechart ArmarXCoreObservers)
-
-# Sources
-
-set(SOURCES
-SpeechObserverTestGroupRemoteStateOfferer.cpp
-)
-
-set(HEADERS
-SpeechObserverTestGroupRemoteStateOfferer.h
-SpeechObserverTestGroup.scgxml
-)
-
+set(COMPONENT_LIBS RobotAPICore ArmarXCoreStatechart ArmarXCoreObservers)
+set(SOURCES SpeechObserverTestGroupRemoteStateOfferer.cpp)
+set(HEADERS SpeechObserverTestGroupRemoteStateOfferer.h SpeechObserverTestGroup.scgxml)
 # adds all existing state headers and sources to CMake
 armarx_generate_statechart_cmake_lists()
-
 armarx_add_component("${SOURCES}" "${HEADERS}")
diff --git a/source/RobotAPI/statecharts/WeissHapticGroup/CMakeLists.txt b/source/RobotAPI/statecharts/WeissHapticGroup/CMakeLists.txt
index 14c15605d..0aa9c7c7a 100644
--- a/source/RobotAPI/statecharts/WeissHapticGroup/CMakeLists.txt
+++ b/source/RobotAPI/statecharts/WeissHapticGroup/CMakeLists.txt
@@ -1,16 +1,5 @@
 armarx_component_set_name("WeissHapticGroup")
 
-find_package(Eigen3 QUIET)
-find_package(Simox QUIET)
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-if (Eigen3_FOUND AND Simox_FOUND)
-    include_directories(${Simox_INCLUDE_DIRS})
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-endif()
-
 set(COMPONENT_LIBS
     RobotAPIInterfaces RobotAPICore RobotAPIUnits
     ArmarXCoreInterfaces ArmarXCore ArmarXCoreStatechart ArmarXCoreObservers)
diff --git a/source/RobotAPI/statecharts/operations/CMakeLists.txt b/source/RobotAPI/statecharts/operations/CMakeLists.txt
index 29bd69f8f..d9de1b3d0 100644
--- a/source/RobotAPI/statecharts/operations/CMakeLists.txt
+++ b/source/RobotAPI/statecharts/operations/CMakeLists.txt
@@ -1,14 +1,4 @@
 armarx_set_target("Core Library: RobotAPIOperations")
-find_package(Eigen3 QUIET)
-find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
-
-armarx_build_if(Eigen3_FOUND "Eigen3 not available")
-armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
-
-if(Eigen3_FOUND AND Simox_FOUND)
-    include_directories(SYSTEM ${Eigen3_INCLUDE_DIR})
-    include_directories(${Simox_INCLUDE_DIRS})
-endif()
 
 set(LIB_NAME       RobotAPIOperations)
 
-- 
GitLab