Skip to content
Snippets Groups Projects
Commit c23d4bd4 authored by Fabian Reister's avatar Fabian Reister
Browse files

modernizing cmakelists (Simox and Eigen usage)

parent 3daaec05
No related branches found
No related tags found
1 merge request!444Chore/armem robot state lib
...@@ -11,9 +11,6 @@ endif() ...@@ -11,9 +11,6 @@ endif()
find_package(Simox QUIET) find_package(Simox QUIET)
armarx_build_if(Simox_FOUND "Simox not available") armarx_build_if(Simox_FOUND "Simox not available")
if(Simox_FOUND)
include_directories(${Simox_INCLUDE_DIR})
endif()
find_package(PythonLibs 3.6 QUIET) find_package(PythonLibs 3.6 QUIET)
armarx_build_if(PYTHONLIBS_FOUND "Python libs not available") armarx_build_if(PYTHONLIBS_FOUND "Python libs not available")
...@@ -26,6 +23,7 @@ set(COMPONENT_LIBS ...@@ -26,6 +23,7 @@ set(COMPONENT_LIBS
RobotAPIComponentPlugins RobotAPIComponentPlugins
RobotAPIInterfaces RobotAPIInterfaces
dynamic_obstacle_avoidance dynamic_obstacle_avoidance
Simox::SimoxUtility
) )
set(SOURCES DSObstacleAvoidance.cpp) set(SOURCES DSObstacleAvoidance.cpp)
......
...@@ -3,15 +3,9 @@ armarx_component_set_name("DynamicObstacleManager") ...@@ -3,15 +3,9 @@ armarx_component_set_name("DynamicObstacleManager")
find_package(Eigen3 QUIET) find_package(Eigen3 QUIET)
armarx_build_if(Eigen3_FOUND "Eigen3 not available") armarx_build_if(Eigen3_FOUND "Eigen3 not available")
if(Eigen3_FOUND)
include_directories(${Eigen3_INCLUDE_DIR})
endif()
find_package(Simox ${ArmarX_Simox_VERSION} QUIET) find_package(Simox ${ArmarX_Simox_VERSION} QUIET)
armarx_build_if(Simox_FOUND "Simox ${ArmarX_Simox_VERSION} or later not available") armarx_build_if(Simox_FOUND "Simox ${ArmarX_Simox_VERSION} or later not available")
if (Simox_FOUND)
include_directories(${Simox_INCLUDE_DIRS})
endif()
find_package(OpenCV QUIET) find_package(OpenCV QUIET)
armarx_build_if(OpenCV_FOUND "OpenCV not available") armarx_build_if(OpenCV_FOUND "OpenCV not available")
...@@ -25,8 +19,10 @@ set(COMPONENT_LIBS ...@@ -25,8 +19,10 @@ set(COMPONENT_LIBS
RobotAPICore RobotAPICore
RobotAPIComponentPlugins RobotAPIComponentPlugins
RobotAPIInterfaces RobotAPIInterfaces
Eigen3::Eigen
${OpenCV_LIBS} ${OpenCV_LIBS}
${Simox_LIBS} Simox::VirtualRobot
# todo maybe add other simox libs
) )
set(SOURCES set(SOURCES
...@@ -42,4 +38,3 @@ set(HEADERS ...@@ -42,4 +38,3 @@ set(HEADERS
armarx_add_component("${SOURCES}" "${HEADERS}") armarx_add_component("${SOURCES}" "${HEADERS}")
armarx_generate_and_add_component_executable() armarx_generate_and_add_component_executable()
...@@ -22,12 +22,10 @@ armarx_add_test( ...@@ -22,12 +22,10 @@ armarx_add_test(
TEST_FILE TEST_FILE
aronOperatorTest.cpp aronOperatorTest.cpp
LIBS LIBS
SimoxUtility # Simox::SimoxUtility Simox::SimoxUtility
ArmarXCore ArmarXCore
aron aron
aroncommon aroncommon
INCLUDE_DIRECTORIES
${Simox_INCLUDE_DIR}
) )
###################### ######################
...@@ -39,9 +37,10 @@ armarx_add_test( ...@@ -39,9 +37,10 @@ armarx_add_test(
TEST_FILE TEST_FILE
aronCodeGenerationTest.cpp aronCodeGenerationTest.cpp
LIBS LIBS
SimoxUtility # Simox::SimoxUtility Simox::SimoxUtility
ArmarXCore ArmarXCore
RobotAPI::aron RobotAPI::aron
Eigen3::Eigen
ARON_FILES ARON_FILES
aron/AnyTest.xml aron/AnyTest.xml
aron/TemplateTest.xml aron/TemplateTest.xml
...@@ -62,8 +61,6 @@ armarx_add_test( ...@@ -62,8 +61,6 @@ armarx_add_test(
aron/OptionalTest.xml aron/OptionalTest.xml
aron/DtoTest.xml aron/DtoTest.xml
INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES
${Simox_INCLUDE_DIR}
${Eigen3_INCLUDE_DIR}
${IVT_INCLUDE_DIRS} ${IVT_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS}
...@@ -78,13 +75,11 @@ armarx_add_test( ...@@ -78,13 +75,11 @@ armarx_add_test(
TEST_FILE TEST_FILE
aronNavigateTest.cpp aronNavigateTest.cpp
LIBS LIBS
SimoxUtility # Simox::SimoxUtility Simox::SimoxUtility
ArmarXCore ArmarXCore
RobotAPI::aron RobotAPI::aron
ARON_FILES ARON_FILES
aron/NaturalIKTest.xml aron/NaturalIKTest.xml
INCLUDE_DIRECTORIES
${Simox_INCLUDE_DIR}
) )
###################### ######################
...@@ -96,14 +91,12 @@ armarx_add_test( ...@@ -96,14 +91,12 @@ armarx_add_test(
TEST_FILE TEST_FILE
aronExtendsTest.cpp aronExtendsTest.cpp
LIBS LIBS
SimoxUtility # Simox::SimoxUtility Simox::SimoxUtility
ArmarXCore ArmarXCore
RobotAPI::aron RobotAPI::aron
ARON_FILES ARON_FILES
aron/BaseClassTest.xml aron/BaseClassTest.xml
aron/DerivedClassTest.xml aron/DerivedClassTest.xml
INCLUDE_DIRECTORIES
${Simox_INCLUDE_DIR}
) )
###################### ######################
...@@ -115,13 +108,11 @@ armarx_add_test( ...@@ -115,13 +108,11 @@ armarx_add_test(
TEST_FILE TEST_FILE
aronConversionTest.cpp aronConversionTest.cpp
LIBS LIBS
SimoxUtility # Simox::SimoxUtility Simox::SimoxUtility
ArmarXCore ArmarXCore
RobotAPI::aron RobotAPI::aron
ARON_FILES ARON_FILES
aron/HumanPoseTest.xml aron/HumanPoseTest.xml
INCLUDE_DIRECTORIES
${Simox_INCLUDE_DIR}
) )
###################### ######################
...@@ -133,14 +124,12 @@ armarx_add_test( ...@@ -133,14 +124,12 @@ armarx_add_test(
TEST_FILE TEST_FILE
aronJsonExportTest.cpp aronJsonExportTest.cpp
LIBS LIBS
SimoxUtility # Simox::SimoxUtility Simox::SimoxUtility
ArmarXCore ArmarXCore
RobotAPI::aron RobotAPI::aron
ARON_FILES ARON_FILES
aron/OptionalTest.xml aron/OptionalTest.xml
aron/MatrixTest.xml aron/MatrixTest.xml
INCLUDE_DIRECTORIES
${Simox_INCLUDE_DIR}
) )
######################## ########################
...@@ -152,13 +141,14 @@ armarx_add_test( ...@@ -152,13 +141,14 @@ armarx_add_test(
# TEST_FILE # TEST_FILE
# aronRandomizedTest.cpp # aronRandomizedTest.cpp
# LIBS # LIBS
# SimoxUtility # Simox::SimoxUtility # Simox::SimoxUtility
# ArmarXCore # ArmarXCore
# RobotAPI::aron # RobotAPI::aron
# ivt # ivt
# ivtopencv # ivtopencv
# ${PCL_COMMON_LIBRARIES} # ${PCL_COMMON_LIBRARIES}
# aronjsonconverter # aronjsonconverter
# Eigen3::Eigen
# ARON_FILES # ARON_FILES
# aron/DictTest.xml # aron/DictTest.xml
# aron/MatrixTest.xml # aron/MatrixTest.xml
...@@ -176,8 +166,6 @@ armarx_add_test( ...@@ -176,8 +166,6 @@ armarx_add_test(
# aron/OptionalTest.xml # aron/OptionalTest.xml
# aron/ImageTest.xml # aron/ImageTest.xml
# INCLUDE_DIRECTORIES # INCLUDE_DIRECTORIES
# ${Simox_INCLUDE_DIR}
# ${Eigen3_INCLUDE_DIR}
# ${IVT_INCLUDE_DIRS} # ${IVT_INCLUDE_DIRS}
# ${OpenCV_INCLUDE_DIRS} # ${OpenCV_INCLUDE_DIRS}
# ${PCL_INCLUDE_DIRS} # ${PCL_INCLUDE_DIRS}
......
armarx_set_target("RobotAPI Core Library: RobotAPICore") armarx_set_target("RobotAPI Core Library: RobotAPICore")
find_package(Eigen3 QUIET) find_package(Eigen3 QUIET)
find_package(Simox ${ArmarX_Simox_VERSION} QUIET) find_package(Simox ${ArmarX_Simox_VERSION} REQUIRED)
armarx_build_if(Eigen3_FOUND "Eigen3 not available") armarx_build_if(Eigen3_FOUND "Eigen3 not available")
armarx_build_if(Simox_FOUND "Simox-VirtualRobot 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(LIB_NAME RobotAPICore)
set(LIBS RobotAPIInterfaces ArmarXCoreObservers ArmarXCoreStatechart ArmarXCoreEigen3Variants set(LIBS RobotAPIInterfaces ArmarXCoreObservers ArmarXCoreStatechart ArmarXCoreEigen3Variants
VirtualRobot Simox::VirtualRobot
Saba # Simox::Saba
SimDynamics # Simox::SimDynamics
Eigen3::Eigen
) )
set(LIB_FILES set(LIB_FILES
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment