1 Star 0 Fork 3

wdw-wayne/panoptic_perceptic

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CMakeLists.txt 3.87 KB
一键复制 编辑 原始数据 按行查看 历史
Allen 提交于 2024-03-03 20:28 . perception
# 设置项目名称
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})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wdw-wayne/panoptic_perceptic.git
[email protected]:wdw-wayne/panoptic_perceptic.git
wdw-wayne
panoptic_perceptic
panoptic_perceptic
master

搜索帮助