Skip to content

Commit

Permalink
Use on-system color-debug, update inclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Jun 16, 2018
1 parent 9f6f72b commit 38e3459
Show file tree
Hide file tree
Showing 77 changed files with 94 additions and 144 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ before_install:
install:
#-- Install 3rd-party dependencies
- sudo apt-get install libboost-thread-dev libeigen3-dev libspnav-dev libxwiimote-dev libusb-1.0-0-dev libgtest-dev
#-- Install color-debug
- git clone https://github.com/roboticslab-uc3m/color-debug
- cd color-debug && mkdir build && cd build
- cmake ..
- sudo make install
- cd ../..
#-- Install yarp
- git clone --branch="$YARP_CHECKOUT" https://github.com/robotology/yarp
- cd yarp && mkdir build && cd build
Expand Down
17 changes: 3 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,15 @@ if(ENABLE_coverage)
endif()
endif()

# Superbuild phase - include color-debug.
include(FindOrBuildPackage)
find_or_build_package(COLOR_DEBUG)

# find_or_build_package() doesn't bring into scope COLOR_DEBUG_INCLUDE_DIRS
# nor other config variables. If a system copy is found, we have to call the
# find_package() command and proceed as usual.
if(USE_SYSTEM_COLOR_DEBUG)
find_package(COLOR_DEBUG REQUIRED)
include_directories(${COLOR_DEBUG_INCLUDE_DIRS})
add_library(COLOR_DEBUG UNKNOWN IMPORTED)
endif()

# Store list of exported targets in global scope.
set_property(GLOBAL PROPERTY ROBOTICSLAB_YARP_DEVICES_TARGETS)

# Create targets if specific requirements are satisfied.
include(CMakeDependentOption)

# Find YARP (main dependency).
# Find project's hard dependencies.
find_package(COLOR_DEBUG REQUIRED)

# https://github.com/roboticslab-uc3m/questions-and-answers/issues/65
find_package(YARP 3.0 QUIET COMPONENTS OS dev sig)
if(NOT YARP_FOUND)
Expand Down
20 changes: 0 additions & 20 deletions cmake/ycm-modules/BuildCOLOR_DEBUG.cmake

This file was deleted.

10 changes: 5 additions & 5 deletions examples/cpp/exampleCanBusControlboard/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)

project(exampleCanBusControlboard)

find_package(YARP REQUIRED)
find_package(COLOR_DEBUG REQUIRED)

include_directories(${YARP_INCLUDE_DIRS}
${COLOR_DEBUG_INCLUDE_DIRS})
include_directories(${YARP_INCLUDE_DIRS})

add_executable(exampleCanBusControlboard main.cpp
ExampleCanBusControlboard.cpp
ExampleCanBusControlboard.hpp)

target_link_libraries(exampleCanBusControlboard YARP::YARP_OS
YARP::YARP_init
YARP::YARP_dev)
YARP::YARP_dev
ROBOTICSLAB::ColorDebug)

include(GNUInstallDirs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <yarp/os/Property.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

/************************************************************************/
roboticslab::ExampleCanBusControlboard::ExampleCanBusControlboard() { }
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp/exampleCanBusControlboard/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Response: [ok]
#include <yarp/os/Network.h>
#include <yarp/os/ResourceFinder.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

#include "ExampleCanBusControlboard.hpp"

Expand Down
7 changes: 3 additions & 4 deletions libraries/OneCanBusOneWrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ if(ENABLE_OneCanBusOneWrapper)
add_library(OneCanBusOneWrapper OneCanBusOneWrapper.cpp
OneCanBusOneWrapper.hpp)

add_dependencies(OneCanBusOneWrapper COLOR_DEBUG)

set_target_properties(OneCanBusOneWrapper PROPERTIES PUBLIC_HEADER OneCanBusOneWrapper.hpp)

target_link_libraries(OneCanBusOneWrapper LINK_PUBLIC YARP::YARP_OS
YARP::YARP_dev)
target_link_libraries(OneCanBusOneWrapper PUBLIC YARP::YARP_OS
YARP::YARP_dev
PRIVATE ROBOTICSLAB::ColorDebug)

target_include_directories(OneCanBusOneWrapper PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
Expand Down
2 changes: 1 addition & 1 deletion libraries/OneCanBusOneWrapper/OneCanBusOneWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <yarp/dev/PolyDriverList.h>
#include <yarp/dev/Wrapper.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

namespace roboticslab
{
Expand Down
7 changes: 3 additions & 4 deletions libraries/TwoCanBusThreeWrappers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ if(ENABLE_TwoCanBusThreeWrappers)
add_library(TwoCanBusThreeWrappers TwoCanBusThreeWrappers.cpp
TwoCanBusThreeWrappers.hpp)

add_dependencies(TwoCanBusThreeWrappers COLOR_DEBUG)

set_target_properties(TwoCanBusThreeWrappers PROPERTIES PUBLIC_HEADER TwoCanBusThreeWrappers.hpp)

target_link_libraries(TwoCanBusThreeWrappers LINK_PUBLIC YARP::YARP_OS
YARP::YARP_dev)
target_link_libraries(TwoCanBusThreeWrappers PUBLIC YARP::YARP_OS
YARP::YARP_dev
PRIVATE ROBOTICSLAB::ColorDebug)

target_include_directories(TwoCanBusThreeWrappers PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <yarp/dev/PolyDriverList.h>
#include <yarp/dev/Wrapper.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

namespace roboticslab
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <amor.h>

#include "ColorDebug.hpp"
#include "ColorDebug.h"

#define DEFAULT_CAN_LIBRARY "libeddriver.so"
#define DEFAULT_CAN_PORT 0
Expand Down
5 changes: 2 additions & 3 deletions libraries/YarpPlugins/AmorControlboard/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ if(NOT SKIP_AmorControlboard)
ITorqueControlImpl.cpp
IInteractionModeImpl.cpp)

add_dependencies(AmorControlboard COLOR_DEBUG)

target_link_libraries(AmorControlboard YARP::YARP_OS
YARP::YARP_dev
AMOR::amor_api)
AMOR::amor_api
ROBOTICSLAB::ColorDebug)

yarp_install(TARGETS AmorControlboard
COMPONENT runtime
Expand Down
2 changes: 1 addition & 1 deletion libraries/YarpPlugins/AravisGigE/AravisGigE.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <arv.h>

#include "ColorDebug.hpp"
#include "ColorDebug.h"

namespace roboticslab {

Expand Down
5 changes: 2 additions & 3 deletions libraries/YarpPlugins/AravisGigE/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ if(NOT SKIP_AravisGigE)
IFrameGrabberImageRawImpl.cpp
IFrameGrabberImpl.cpp)

add_dependencies(AravisGigE COLOR_DEBUG)

target_link_libraries(AravisGigE YARP::YARP_OS
YARP::YARP_dev
${ARAVIS_LIBRARIES})
${ARAVIS_LIBRARIES}
ROBOTICSLAB::ColorDebug)

yarp_install(TARGETS AravisGigE
COMPONENT runtime
Expand Down
3 changes: 1 addition & 2 deletions libraries/YarpPlugins/CanBusControlboard/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ yarp_add_plugin(CanBusControlboard CanBusControlboard.cpp
IVelocityControl2Impl.cpp
ThreadImpl.cpp)

add_dependencies(CanBusControlboard COLOR_DEBUG)

target_link_libraries(CanBusControlboard YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug
YarpDevicesInterfaces)

# Hack, fool CMake to think that YARP already switched to 3.0 while still at devel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//#define CD_HIDE_INFO //-- Can be managed from father CMake.
//#define CD_HIDE_WARNING //-- Can be managed from father CMake.
//#define CD_HIDE_ERROR //-- Can be managed from father CMake.
#include "ColorDebug.hpp"
#include "ColorDebug.h"

#include "ICanBusSharer.h"

Expand Down
3 changes: 1 addition & 2 deletions libraries/YarpPlugins/CanBusFake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ yarp_add_plugin(CanBusFake CanBusFake.cpp
CanBusFake.hpp
DeviceDriverImpl.cpp)

add_dependencies(CanBusFake COLOR_DEBUG)

target_link_libraries(CanBusFake YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug
YarpDevicesInterfaces)

yarp_install(TARGETS CanBusFake
Expand Down
2 changes: 1 addition & 1 deletion libraries/YarpPlugins/CanBusFake/CanBusFake.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "ICanBusHico.h"

#include "ColorDebug.hpp"
#include "ColorDebug.h"

namespace roboticslab
{
Expand Down
3 changes: 1 addition & 2 deletions libraries/YarpPlugins/CanBusHico/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ yarp_add_plugin(CanBusHico CanBusHico.cpp
hico_api.h
DeviceDriverImpl.cpp)

add_dependencies(CanBusHico COLOR_DEBUG)

target_link_libraries(CanBusHico YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug
YarpDevicesInterfaces)

yarp_install(TARGETS CanBusHico
Expand Down
2 changes: 1 addition & 1 deletion libraries/YarpPlugins/CanBusHico/CanBusHico.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "ICanBusHico.h"

#include "ColorDebug.hpp"
#include "ColorDebug.h"

namespace roboticslab
{
Expand Down
3 changes: 1 addition & 2 deletions libraries/YarpPlugins/CuiAbsolute/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ yarp_add_plugin(CuiAbsolute CuiAbsolute.cpp
ITorqueControlRawImpl.cpp
IVelocityControl2RawImpl.cpp)

add_dependencies(CuiAbsolute COLOR_DEBUG)

target_link_libraries(CuiAbsolute YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug
YarpDevicesInterfaces)

# Hack, fool CMake to think that YARP already switched to 3.0 while still at devel.
Expand Down
2 changes: 1 addition & 1 deletion libraries/YarpPlugins/CuiAbsolute/CuiAbsolute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//#define CD_HIDE_INFO //-- Can be globally managed from father CMake.
//#define CD_HIDE_WARNING //-- Can be globally managed from father CMake.
//#define CD_HIDE_ERROR //-- Can be globally managed from father CMake.
#include "ColorDebug.hpp"
#include "ColorDebug.h"
#include "ICanBusSharer.h"
#include "ICuiAbsolute.h"

Expand Down
3 changes: 1 addition & 2 deletions libraries/YarpPlugins/FakeControlboard/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ yarp_add_plugin(FakeControlboard FakeControlboard.hpp
RateThreadImpl.cpp
SharedArea.cpp)

add_dependencies(FakeControlboard COLOR_DEBUG)

target_link_libraries(FakeControlboard YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug
YarpDevicesInterfaces)

yarp_install(TARGETS FakeControlboard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <yarp/os/Bottle.h>
#include <yarp/os/Time.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- DeviceDriver Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "FakeControlboard.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- Miscellanea ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "FakeControlboard.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- IControlLimits2 Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "FakeControlboard.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- IControlLimits Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "FakeControlboard.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- IControlMode2 Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "FakeControlboard.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- IControlMode Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "FakeControlboard.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- IPositionControl2 Related --------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "FakeControlboard.hpp"

#include <cmath>
#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- IPositionControl Related --------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "FakeControlboard.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- IForceControl Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "FakeControlboard.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------ IVelocity2 Related ----------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "FakeControlboard.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------ IVelocity Related ----------------------------------------

Expand Down
Loading

0 comments on commit 38e3459

Please sign in to comment.