代码拉取完成,页面将自动刷新
同步操作将从 杨一帆/panoptic_perceptic 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# 设置项目名称
project(mwrobot_panoptic_perception)
# 最小CMake版本号
cmake_minimum_required(VERSION 3.5)
# C++14为标准
set( CMAKE_CXX_STANDARD 14 )
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
# set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(VERSION_NUMBER V001)
string(TIMESTAMP COMPILE_TIME %y%m%d-%H%M%S-${VERSION_NUMBER})
set(build_time ${COMPILE_TIME})
configure_file(
"config/version_config.h.in"
"config/version_config.h"
)
# ------------------------------- 3rdparty -------------------------------
include_directories(
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/config
${PROJECT_SOURCE_DIR}/3rdparty
${PROJECT_SOURCE_DIR}/3rdparty/MVS/include
${PROJECT_SOURCE_DIR}/3rdparty/mpp/include
${PROJECT_SOURCE_DIR}/3rdparty/mpp/include/rockchip
${PROJECT_SOURCE_DIR}/3rdparty/live555/include
${PROJECT_SOURCE_DIR}/3rdparty/live555/include/BasicUsageEnvironment
${PROJECT_SOURCE_DIR}/3rdparty/live555/include/groupsock
${PROJECT_SOURCE_DIR}/3rdparty/live555/include/liveMedia
${PROJECT_SOURCE_DIR}/3rdparty/live555/include/UsageEnvironment
${PROJECT_SOURCE_DIR}/3rdparty/librknn_api/include
${PROJECT_SOURCE_DIR}/3rdparty/rga/include
/usr/include/aarch64-linux-gnu
)
link_directories(
${PROJECT_SOURCE_DIR}/3rdparty/mpp/lib
${PROJECT_SOURCE_DIR}/3rdparty/live555/lib
${PROJECT_SOURCE_DIR}/3rdparty/MVS/aarch64
${PROJECT_SOURCE_DIR}/3rdparty/librknn_api/aarch64
${PROJECT_SOURCE_DIR}/3rdparty/rga/lib
)
# ------------------------------- OPENCV -------------------------------
find_package(OpenCV REQUIRED)
message(STATUS " OpenCV library status:")
message(STATUS " version: ${OpenCV_VERSION}")
message(STATUS " libraries: ${OpenCV_LIBS}")
message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
include_directories(
${OpenCV_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}/opencv2
)
# ------------------------------- ROS2 -------------------------------
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rmw REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)
find_package(tf2 REQUIRED)
find_package(mwrobot_msgs REQUIRED)
find_package(mwrobot_base_core REQUIRED)
# 设置依赖关系
set(dependencies ament_cmake rclcpp rmw tf2_ros tf2_geometry_msgs tf2 mwrobot_msgs mwrobot_base_core)
include_directories(
${ament_cmake_INCLUDE_DIRS}
${rclcpp_INCLUDE_DIRS}
${rmw_INCLUDE_DIRS}
${tf2_ros_INCLUDE_DIRS}
${tf2_geometry_msgs_INCLUDE_DIRS}
${tf2_INCLUDE_DIRS}
${mwrobot_msgs_INCLUDE_DIRS}
${mwrobot_base_core_INCLUDE_DIRS}
)
# ------------------------------- sirius -------------------------------
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /opt/sirius /opt/sirius_log)
find_package(sirius REQUIRED)
find_package(sirius_log REQUIRED)
include_directories(
${sirius}
${sirius_INCLUDE_DIRS}
${sirius_log_INCLUDE_DIRS}
${tf2_INCLUDE_DIRS}
)
link_directories(
${sirius_LIBRARY_PATH}
${sirius_log_LIBRARY_PATH}
)
link_directories(
/usr/lib/aarch64-linux-gnu
/usr/lib
/usr/local/lib
)
# 递归查找所有符合通配符的文件
file(GLOB_RECURSE SOURCE_FILES src/*.h src/*.cpp src/*.c 3rdparty/nlohmann/json.hpp)
# 定义可执行文件
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
# 链接库文件到可执行文件
target_link_libraries(
${PROJECT_NAME}
${OpenCV_LIBS}
FormatConversion MediaProcess MvCameraControl MVGigEVisionSDK MVRender MvUsb3vTL
liveMedia BasicUsageEnvironment groupsock UsageEnvironment
pthread rockchip_mpp rga rknnrt
rockchip_mpp
utils
-lavformat -lavcodec -lswscale -lavutil -lz
m
)
# ros2
target_link_libraries(${PROJECT_NAME} ${mwrobot_base_core_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${sirius_LIBRARIES} ${sirius_log_LIBRARIES} ${rclcpp_INCLUDE_DIRS} )
ament_target_dependencies(${PROJECT_NAME} ${dependencies})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。