Skip to content

Commit

Permalink
Update CMake code
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Jan 28, 2020
1 parent cb1aae9 commit 7da3521
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 31 deletions.
44 changes: 19 additions & 25 deletions libraries/YarpPlugins/CanBusSocket/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,24 @@ yarp_prepare_plugin(CanBusSocket

if(NOT SKIP_CanBusSocket)

get_property(_common_dirs GLOBAL PROPERTY ROBOTICSLAB_YARP_DEVICES_INCLUDE_DIRS)

include_directories(${CMAKE_CURRENT_SOURCE_DIR} # yarp plugin builder needs this
${_common_dirs})

yarp_add_plugin(CanBusSocket CanBusSocket.cpp
CanBusSocket.hpp
DeviceDriverImpl.cpp
ICanBusImpl.cpp
SocketCanMessage.cpp
SocketCanMessage.hpp)

add_dependencies(CanBusSocket COLOR_DEBUG)

target_link_libraries(CanBusSocket YARP::YARP_OS
YARP::YARP_dev)

yarp_install(TARGETS CanBusSocket
COMPONENT runtime
LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})

yarp_install(FILES CanBusSocket.ini
COMPONENT runtime
DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
if(NOT YARP_VERSION VERSION_GREATER_EQUAL 3.4)
set(CMAKE_INCLUDE_CURRENT_DIR TRUE) # yarp plugin builder needs this
endif()

yarp_add_plugin(CanBusSocket CanBusSocket.cpp
CanBusSocket.hpp
DeviceDriverImpl.cpp
ICanBusImpl.cpp
SocketCanMessage.cpp
SocketCanMessage.hpp)

target_link_libraries(CanBusSocket YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug)

yarp_install(TARGETS CanBusSocket
LIBRARY DESTINATION ${ROBOTICSLAB-YARP-DEVICES_DYNAMIC_PLUGINS_INSTALL_DIR}
ARCHIVE DESTINATION ${ROBOTICSLAB-YARP-DEVICES_STATIC_PLUGINS_INSTALL_DIR}
YARP_INI DESTINATION ${ROBOTICSLAB-YARP-DEVICES_PLUGIN_MANIFESTS_INSTALL_DIR})

endif()
6 changes: 0 additions & 6 deletions libraries/YarpPlugins/CanBusSocket/CanBusSocket.ini

This file was deleted.

0 comments on commit 7da3521

Please sign in to comment.