cmake_minimum_required(VERSION 3.0.2)
project(upbot_following)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  message_generation
  geometry_msgs
  pibot_msgs
)

# 寻找OpenCV库
find_package(OpenCV REQUIRED)
# 查找 Boost 库
find_package(Boost REQUIRED)

# catkin_package(
# #  INCLUDE_DIRS include
# #  LIBRARIES upbot_following
# #  CATKIN_DEPENDS roscpp rospy std_msgs
# #  DEPENDS system_lib
# CATKIN_DEPENDS message_runtime std_msgs geometry_msgs
# )


include_directories(
# include
 ${OpenCV_INCLUDE_DIRS}
  ${catkin_INCLUDE_DIRS}
        include
)

add_library(${PROJECT_NAME} SHARED
        
        src/uwb.cpp
        src/mapping.cpp
        src/align.cpp
        src/Mat.cpp
        src/lighthouse.cpp
        include/senddata.h src/senddata.cpp)



generate_messages(DEPENDENCIES std_msgs geometry_msgs)

catkin_package(CATKIN_DEPENDS message_runtime std_msgs geometry_msgs)
add_executable(${PROJECT_NAME}_node src/main.cpp)


target_link_libraries(${PROJECT_NAME}_node  ${catkin_LIBRARIES}  ${OpenCV_LIBS} ${Boost_LIBRARIES} pthread ${PROJECT_NAME})


