Skip to content

Commit

Permalink
Move OpenRAVE+Boost find_package() calls to root
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Mar 25, 2018
1 parent a6754ba commit e27f1cf
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 39 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ set_property(GLOBAL PROPERTY ROBOTICSLAB_OPENRAVE_YARP_PLUGINS_TARGETS)
# Create targets if specific requirements are satisfied.
include(CMakeDependentOption)

# Find OpenRAVE+Boost (main dependency).
find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT REQUIRED
COMPONENTS iostreams python thread system)

# Find YARP (main dependency).
find_package(YARP REQUIRED)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ option(ENABLE_OpenraveDumpManipulatorJointLinks "Enable/disable OpenraveDumpMani

if(ENABLE_OpenraveDumpManipulatorJointLinks)

find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT COMPONENTS iostreams python thread)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${OpenRAVE_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS})

link_directories(${OpenRAVE_LIBRARY_DIRS}
${Boost_LIBRARY_DIRS})

add_library(OpenraveDumpManipulatorJointLinks SHARED OpenraveDumpManipulatorJointLinks.cpp)
add_library(OpenraveDumpManipulatorJointLinks OpenraveDumpManipulatorJointLinks.cpp)

set_target_properties(OpenraveDumpManipulatorJointLinks PROPERTIES COMPILE_FLAGS "${OpenRAVE_CXX_FLAGS}"
LINK_FLAGS "${OpenRAVE_LINK_FLAGS}")
Expand Down
5 changes: 1 addition & 4 deletions libraries/OpenravePlugins/OpenraveYarpCoupled/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ option(ENABLE_OpenraveYarpCoupled "Enable/disable OpenraveYarpCoupled" ON)

if(ENABLE_OpenraveYarpCoupled)

find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT COMPONENTS iostreams python thread)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${OpenRAVE_INCLUDE_DIRS}
${YARP_INCLUDE_DIRS}
Expand All @@ -16,7 +13,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
link_directories(${OpenRAVE_LIBRARY_DIRS}
${Boost_LIBRARY_DIRS})

add_library(OpenraveYarpCoupled SHARED OpenraveYarpCoupled.cpp)
add_library(OpenraveYarpCoupled OpenraveYarpCoupled.cpp)

set_target_properties(OpenraveYarpCoupled PROPERTIES COMPILE_FLAGS "${OpenRAVE_CXX_FLAGS}"
LINK_FLAGS "${OpenRAVE_LINK_FLAGS}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ option(ENABLE_OpenraveYarpForceEstimator "Enable/disable OpenraveYarpForceEstima

if(ENABLE_OpenraveYarpForceEstimator)

find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT COMPONENTS iostreams python thread)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${OpenRAVE_INCLUDE_DIRS}
${YARP_INCLUDE_DIRS}
Expand All @@ -16,7 +13,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
link_directories(${OpenRAVE_LIBRARY_DIRS}
${Boost_LIBRARY_DIRS})

add_library(OpenraveYarpForceEstimator SHARED OpenraveYarpForceEstimator.cpp)
add_library(OpenraveYarpForceEstimator OpenraveYarpForceEstimator.cpp)

set_target_properties(OpenraveYarpForceEstimator PROPERTIES COMPILE_FLAGS "${OpenRAVE_CXX_FLAGS}"
LINK_FLAGS "${OpenRAVE_LINK_FLAGS}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ option(ENABLE_OpenraveYarpPaintSquares "Enable/disable OpenraveYarpPaintSquares"

if(ENABLE_OpenraveYarpPaintSquares)

find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT COMPONENTS iostreams python thread)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${OpenRAVE_INCLUDE_DIRS}
${YARP_INCLUDE_DIRS}
Expand All @@ -16,7 +13,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
link_directories(${OpenRAVE_LIBRARY_DIRS}
${Boost_LIBRARY_DIRS})

add_library(OpenraveYarpPaintSquares SHARED OpenraveYarpPaintSquares.cpp)
add_library(OpenraveYarpPaintSquares OpenraveYarpPaintSquares.cpp)

set_target_properties(OpenraveYarpPaintSquares PROPERTIES COMPILE_FLAGS "${OpenRAVE_CXX_FLAGS}"
LINK_FLAGS "${OpenRAVE_LINK_FLAGS}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ option(ENABLE_OpenraveYarpPluginLoader "Enable/disable OpenraveYarpPluginLoader"

if(ENABLE_OpenraveYarpPluginLoader)

find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT COMPONENTS iostreams python thread)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${OpenRAVE_INCLUDE_DIRS}
${YARP_INCLUDE_DIRS}
Expand All @@ -16,7 +13,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
link_directories(${OpenRAVE_LIBRARY_DIRS}
${Boost_LIBRARY_DIRS})

add_library(OpenraveYarpPluginLoader SHARED OpenraveYarpPluginLoader.cpp)
add_library(OpenraveYarpPluginLoader OpenraveYarpPluginLoader.cpp)

set_target_properties(OpenraveYarpPluginLoader PROPERTIES COMPILE_FLAGS "${OpenRAVE_CXX_FLAGS}"
LINK_FLAGS "${OpenRAVE_LINK_FLAGS}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ option(ENABLE_OpenraveYarpWorldRpcResponder "Enable/disable OpenraveYarpWorldRpc

if(ENABLE_OpenraveYarpWorldRpcResponder)

find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT COMPONENTS iostreams python thread)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${OpenRAVE_INCLUDE_DIRS}
${YARP_INCLUDE_DIRS}
Expand All @@ -16,7 +13,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
link_directories(${OpenRAVE_LIBRARY_DIRS}
${Boost_LIBRARY_DIRS})

add_library(OpenraveYarpWorldRpcResponder SHARED OpenraveYarpWorldRpcResponder.cpp)
add_library(OpenraveYarpWorldRpcResponder OpenraveYarpWorldRpcResponder.cpp)

set_target_properties(OpenraveYarpWorldRpcResponder PROPERTIES COMPILE_FLAGS "${OpenRAVE_CXX_FLAGS}"
LINK_FLAGS "${OpenRAVE_LINK_FLAGS}")
Expand Down
3 changes: 0 additions & 3 deletions libraries/YarpOpenraveBase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ option(ENABLE_YarpOpenraveBase "Enable/disable YarpOpenraveBase" ON)

if(ENABLE_YarpOpenraveBase)

find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT REQUIRED COMPONENTS iostreams python thread system)

add_library(YarpOpenraveBase OBJECT YarpOpenraveBase.hpp
YarpOpenraveBase.cpp)

Expand Down
3 changes: 0 additions & 3 deletions libraries/YarpPlugins/YarpOpenraveControlboard/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ yarp_prepare_plugin(YarpOpenraveControlboard

if(NOT SKIP_YarpOpenraveControlboard)

find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT REQUIRED COMPONENTS iostreams python thread system)

include_directories(${CMAKE_CURRENT_SOURCE_DIR} # yarp plugin builder needs this
${OpenRAVE_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
Expand Down
3 changes: 0 additions & 3 deletions libraries/YarpPlugins/YarpOpenraveGrabber/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ yarp_prepare_plugin(YarpOpenraveGrabber

if(NOT SKIP_YarpOpenraveGrabber)

find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT REQUIRED COMPONENTS iostreams python thread system)

include_directories(${CMAKE_CURRENT_SOURCE_DIR} # yarp plugin builder needs this
${OpenRAVE_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
Expand Down
3 changes: 0 additions & 3 deletions libraries/YarpPlugins/YarpOpenraveRGBDSensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ yarp_prepare_plugin(YarpOpenraveRGBDSensor

if(NOT SKIP_YarpOpenraveRGBDSensor)

find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT REQUIRED COMPONENTS iostreams python thread system)

include_directories(${CMAKE_CURRENT_SOURCE_DIR} # yarp plugin builder needs this
${OpenRAVE_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
Expand Down
3 changes: 0 additions & 3 deletions libraries/YarpPlugins/YarpOpenraveRobotManager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ yarp_prepare_plugin(YarpOpenraveRobotManager

if(NOT SKIP_YarpOpenraveRobotManager)

find_package(OpenRAVE REQUIRED)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT REQUIRED COMPONENTS iostreams python thread system)

include_directories(${CMAKE_CURRENT_SOURCE_DIR} # yarp plugin builder needs this
${OpenRAVE_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
Expand Down

1 comment on commit e27f1cf

@jgvictores
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PeterBowman THANK YOU!!!

Please sign in to comment.