cmake_minimum_required(VERSION 3.5)
project(3dplan VERSION 0.1 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#如果要生成debug版本
SET(CMAKE_BUILD_TYPE "Debug")
#如果要生成release版本
#SET(CMAKE_BUILD_TYPE "Release")
#添加的支持debug和release支持
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
#SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets LinguistTools DataVisualization OpenGL)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools DataVisualization OpenGL)
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
find_package(Python3 COMPONENTS NumPy qt-material)
find_package(sbpl REQUIRED)
#find_package(opengl REQUIRED)
include_directories( # 包含路径后,可以直接引入头文件名字而不需要路径了
${catkin_INCLUDE_DIRS}
data
plot3d
include
planner
)
add_subdirectory(spiral_constraint)
find_package(Eigen3 REQUIRED)
#find_package(Matplot++ REQUIRED)
include_directories()
set(TS_FILES 3dplan_zh_CN.ts)
set(PROJECT_SOURCES
main.cpp
mainwindow.cpp
include/mainwindow.h
include/json.hpp
include/utils.hpp
src/utils.cpp
data/readtiff.cpp
data/readtiff.h
data/readprimitives.cpp
data/readprimitives.h
plot3d/surfacegraph.cpp
plot3d/surfacegraph.h
plot3d/QPlot3D.cpp
plot3d/QPlot3D.h
planner/planner.h
planner/planner.cpp
# environment/environment_navxyztheta.cpp
# environment/environment_navxyztheta.h
mainwindow.ui
${TS_FILES}
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(3dplan
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
# Define target properties for Android with Qt 6 as:
# set_property(TARGET 3dplan APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# ${CMAKE_CURRENT_SOURCE_DIR}/android)
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
else()
if(ANDROID)
add_library(3dplan SHARED
${PROJECT_SOURCES}
)
# Define properties for Android with Qt 5 after find_package() calls as:
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
else()
add_executable(3dplan
${PROJECT_SOURCES}
)
endif()
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
endif()
target_link_libraries(3dplan PRIVATE Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::DataVisualization
Qt${QT_VERSION_MAJOR}::OpenGL
-lGL
gdal MPs sbpl
Eigen3::Eigen
# Matplot++::matplot
Python3::Python
Python3::NumPy
# Python3::qt-material
)
set_target_properties(3dplan PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
install(TARGETS 3dplan
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(3dplan)
endif()
.whl
- 粉丝: 3923
- 资源: 4859
最新资源
- 机械设计清洗机sw21全套设计资料100%好用.zip.zip
- Python基础知识入门及实例解析
- 基于MATLAB和Python的图像加解密算法实现
- 证件照处理技术 - Python和OpenCV实现尺寸调整与背景更换
- mzx1033203084
- 机械设计3.5JACK自动组装机sw18可编辑全套设计资料100%好用.zip
- 机械设计45度铝材锯切设备step全套设计资料100%好用.zip
- 机械设计C1汽车车轮钢圈加工 sw16全套设计资料100%好用.zip
- 机械设计BP工业油桶20L自动化检测线(sw18可编辑+工程图+BOM)全套设计资料100%好用.zip
- E9将流程附件进行文档比对.zip
- 机械设计Co2清洗与测试机sw18可编辑全套设计资料100%好用.zip
- vbs维护系统2005版学习参考完美实例最新版本
- 机械设计DN65DN65板式换热机组sw14可编辑全套设计资料100%好用.zip
- 基于django,d3js与echarts的领域知识图谱检索与计量平台.面向语言政策领,包括语言政策领域的知识检索,关系检索与钻取,计量分析,知识可视化.详细文档+全部资料+优秀项目.zip
- 基于neo4j的知识图谱, 构建智能多轮问答详细文档+全部资料+优秀项目.zip
- 基于 RAG 与大模型技术的医疗问答系统,详细文档+全部资料+优秀项目.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈