Skip to content
Snippets Groups Projects
Commit a48f36f5 authored by Manfred Kröhnert's avatar Manfred Kröhnert
Browse files

cmake: use include_directories() only if the required libraries have been found

parent efaae0f2
No related branches found
No related tags found
No related merge requests found
......@@ -7,8 +7,11 @@ find_package(Simox QUIET)
armarx_build_if(Eigen3_FOUND "Eigen3 not available")
armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
include_directories(${Eigen3_INCLUDE_DIR})
include_directories(${Simox_INCLUDE_DIRS})
if (Eigen3_FOUND AND Simox_FOUND)
include_directories(
${Eigen3_INCLUDE_DIR}
${Simox_INCLUDE_DIRS})
endif()
set(LIB_NAME GraspingWithTorques)
set(LIB_VERSION 0.1.0)
......
......@@ -6,8 +6,11 @@ find_package(Simox QUIET)
armarx_build_if(Eigen3_FOUND "Eigen3 not available")
armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
include_directories(${Eigen3_INCLUDE_DIR})
include_directories(${Simox_INCLUDE_DIRS})
if (Eigen3_FOUND AND Simox_FOUND)
include_directories(
${Eigen3_INCLUDE_DIR}
${Simox_INCLUDE_DIRS})
endif()
set(LIB_NAME OpenHand)
set(LIB_VERSION 0.1.0)
......
......@@ -7,14 +7,6 @@ armarx_build_if(Eigen3_FOUND "Eigen3 not available")
find_package(Simox QUIET)
armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
# check if ArmarXCoreUnits library gets built
# LOCATION is NOT-FOUND (equal to FALSE) if library is disabled
GET_TARGET_PROPERTY(ArmarXCoreUnits_ENABLED ArmarXCoreUnits LOCATION)
armarx_build_if(ArmarXCoreUnits_ENABLED "ArmarXCoreUnits library disabled")
GET_TARGET_PROPERTY(ArmarXCoreObservers_ENABLED ArmarXCoreObservers LOCATION)
armarx_build_if(ArmarXCoreObservers_ENABLED "ArmarXCoreObservers library disabled")
set(COMPONENT_LIBS RobotAPIUnits RobotAPICore RobotAPIInterfaces ArmarXInterfaces ArmarXCore ArmarXCoreObservers ArmarXCoreRemoteRobot)
......
......@@ -7,14 +7,6 @@ armarx_build_if(Eigen3_FOUND "Eigen3 not available")
find_package(Simox QUIET)
armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
# check if ArmarXCoreUnits library gets built
# LOCATION is NOT-FOUND (equal to FALSE) if library is disabled
GET_TARGET_PROPERTY(ArmarXCoreUnits_ENABLED ArmarXCoreUnits LOCATION)
armarx_build_if(ArmarXCoreUnits_ENABLED "ArmarXCoreUnits library disabled")
GET_TARGET_PROPERTY(ArmarXCoreObservers_ENABLED ArmarXCoreObservers LOCATION)
armarx_build_if(ArmarXCoreObservers_ENABLED "ArmarXCoreObservers library disabled")
set(COMPONENT_LIBS MotionControl RobotAPICore ArmarXInterfaces ArmarXCore ArmarXCoreObservers ArmarXCoreRobotStateComponent ArmarXCoreStatechart ArmarXCoreOperations)
......
......@@ -7,17 +7,12 @@ armarx_build_if(Eigen3_FOUND "Eigen3 not available")
find_package(Simox QUIET)
armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
# check if ArmarXCoreUnits library gets built
# LOCATION is NOT-FOUND (equal to FALSE) if library is disabled
GET_TARGET_PROPERTY(ArmarXCoreUnits_ENABLED ArmarXCoreUnits LOCATION)
armarx_build_if(ArmarXCoreUnits_ENABLED "ArmarXCoreUnits library disabled")
if (Eigen3_FOUND AND Simox_FOUND)
include_directories(
${Eigen3_INCLUDE_DIR}
${Simox_INCLUDE_DIRS})
endif()
GET_TARGET_PROPERTY(ArmarXCoreObservers_ENABLED ArmarXCoreObservers LOCATION)
armarx_build_if(ArmarXCoreObservers_ENABLED "ArmarXCoreObservers library disabled")
include_directories(${Eigen3_INCLUDE_DIR})
include_directories(${Simox_INCLUDE_DIRS})
set(COMPONENT_LIBS MotionControl RobotAPICore ArmarXInterfaces ArmarXCore ArmarXCoreObservers ArmarXCoreRobotStateComponent ArmarXCoreStatechart ArmarXCoreOperations ${Simox_LIBRARIES})
set(SOURCES main.cpp MotionControlTestApp.h)
......
......@@ -7,17 +7,12 @@ armarx_build_if(Eigen3_FOUND "Eigen3 not available")
find_package(Simox QUIET)
armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
# check if ArmarXCoreUnits library gets built
# LOCATION is NOT-FOUND (equal to FALSE) if library is disabled
GET_TARGET_PROPERTY(ArmarXCoreUnits_ENABLED ArmarXCoreUnits LOCATION)
armarx_build_if(ArmarXCoreUnits_ENABLED "ArmarXCoreUnits library disabled")
if (Eigen3_FOUND AND Simox_FOUND)
include_directories(
${Eigen3_INCLUDE_DIR}
${Simox_INCLUDE_DIRS})
endif()
GET_TARGET_PROPERTY(ArmarXCoreObservers_ENABLED ArmarXCoreObservers LOCATION)
armarx_build_if(ArmarXCoreObservers_ENABLED "ArmarXCoreObservers library disabled")
include_directories(${Eigen3_INCLUDE_DIR})
include_directories(${Simox_INCLUDE_DIRS})
set(COMPONENT_LIBS RobotAPIUnits RobotAPICore RobotAPIInterfaces ArmarXInterfaces ArmarXCore ArmarXCoreObservers ArmarXCoreRemoteRobot ${Simox_LIBRARIES})
set(SOURCES main.cpp TCPControlUnitApp.h)
......
......@@ -7,8 +7,11 @@ find_package(Simox QUIET)
armarx_build_if(Eigen3_FOUND "Eigen3 not available")
armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
include_directories(${Eigen3_INCLUDE_DIR})
include_directories(${Simox_INCLUDE_DIRS})
if (Eigen3_FOUND AND Simox_FOUND)
include_directories(
${Eigen3_INCLUDE_DIR}
${Simox_INCLUDE_DIRS})
endif()
set(LIB_NAME RobotAPICore)
set(LIB_VERSION 0.1.0)
......
......@@ -7,8 +7,11 @@ find_package(Simox QUIET)
armarx_build_if(Eigen3_FOUND "Eigen3 not available")
armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
include_directories(${Eigen3_INCLUDE_DIR})
include_directories(${Simox_INCLUDE_DIRS})
if (Eigen3_FOUND AND Simox_FOUND)
include_directories(
${Eigen3_INCLUDE_DIR}
${Simox_INCLUDE_DIRS})
endif()
set(LIB_NAME MotionControl)
set(LIB_VERSION 0.1.0)
......
......@@ -7,8 +7,11 @@ find_package(Simox QUIET)
armarx_build_if(Eigen3_FOUND "Eigen3 not available")
armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
include_directories(${Eigen3_INCLUDE_DIR})
include_directories(${Simox_INCLUDE_DIRS})
if (Eigen3_FOUND AND Simox_FOUND)
include_directories(
${Eigen3_INCLUDE_DIR}
${Simox_INCLUDE_DIRS})
endif()
set(LIB_NAME RobotAPIUnits)
set(LIB_VERSION 0.1.0)
......
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