51 lines
1.2 KiB
CMake
51 lines
1.2 KiB
CMake
add_library(c701 SHARED
|
|
${CMAKE_CURRENT_SOURCE_DIR}/motor/motor_controller.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/motor/protocol/ti5_motor_sdo_response.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/motor/protocol/ti5_motor_tpdo1.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/motor/protocol/ti5_motor_tpdo2.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/motor/protocol/ti5_motor_rpdo1.cpp)
|
|
|
|
|
|
target_include_directories(c701 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
add_library(cmvr_es::robot::c701 ALIAS c701)
|
|
|
|
target_link_libraries(c701
|
|
PRIVATE
|
|
cmvr_es::device::canbus
|
|
protobuf
|
|
glog
|
|
)
|
|
|
|
|
|
# --------------------------------------------------------
|
|
# Unit test
|
|
# --------------------------------------------------------
|
|
include_directories(
|
|
${CMAKE_SOURCE_DIR}/third_party/gtest/1.17.0/include
|
|
)
|
|
|
|
link_directories(
|
|
${CMAKE_SOURCE_DIR}/third_party/gtest/1.17.0/lib
|
|
)
|
|
|
|
|
|
add_executable(motor_controller_test
|
|
${CMAKE_CURRENT_SOURCE_DIR}/motor/motor_controller_test.cpp
|
|
)
|
|
|
|
|
|
target_link_libraries(motor_controller_test
|
|
PRIVATE
|
|
cmvr_es::device::canbus
|
|
cmvr_es::robot::c701
|
|
c701
|
|
gtest
|
|
gtest_main
|
|
pthread
|
|
glog
|
|
cmvr_es::proto
|
|
)
|
|
|
|
|