refactor(cloudview): 重构项目结构与代码格式,优化构建配置

1.  调整.gitignore规则,新增资源文件忽略项
2.  重构子项目依赖配置,统一项目构建路径
3.  修复CloudView头文件和pro文件的包含路径
4.  格式化代码缩进与注释风格,调整类成员布局
5.  为CloudView新增--help/-h和--version/-v命令行参数
6.  重构点云渲染模块,新增GLES2 shader渲染支持与悬浮控件
This commit is contained in:
杰仔 2026-08-18 12:26:08 +08:00
commit 44180b7f85
13 changed files with 3851 additions and 3218 deletions

6
.gitignore vendored
View File

@ -15,8 +15,10 @@
Makefile*
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
qrc_*.cpp
*_resource.rc
*_resource.res
ui_*.h
*.autosave
# 构建目录

View File

@ -4,10 +4,17 @@
QT += core
# 鎸囧畾椤圭洰妯℃澘涓洪潤鎬佸簱
TEMPLATE = lib
CONFIG += staticlib
win32-msvc {
TEMPLATE = lib
CONFIG += staticlib
win32:CONFIG(debug, debug|release) {
DESTDIR = $$PWD/debug
}
win32:CONFIG(release, debug|release) {
DESTDIR = $$PWD/release
}
win32-msvc {
QMAKE_CXXFLAGS += /utf-8
}

File diff suppressed because it is too large Load Diff

View File

@ -15,9 +15,9 @@ TEMPLATE = app
# 椤圭洰鐩綍
INCLUDEPATH += $$PWD/Inc
INCLUDEPATH += $$PWD/../../Device/SDK/VzNLSDK/Inc
INCLUDEPATH += $$PWD/../CloudView3D/Inc
INCLUDEPATH += $$PWD/../CloudUtils/Inc
INCLUDEPATH += $$PWD/../../Device/SDK/VzNLSDK/Inc
INCLUDEPATH += $$PWD/../VrUtils/Inc
INCLUDEPATH += $$PWD/../VrCommon/Inc
@ -35,23 +35,28 @@ SOURCES += \
# 璧勬簮鏂囦欢
RESOURCES += resource/resource.qrc
RESOURCES += $$PWD/../../AppUtils/UICommon/common_resources.qrc
COMMON_RESOURCES = $$PWD/../../AppUtils/UICommon/common_resources.qrc
exists($$COMMON_RESOURCES) {
RESOURCES += $$COMMON_RESOURCES
} else {
message("CloudView: optional common_resources.qrc not found; using text view buttons")
}
# Windows 搴旂敤鍥炬爣
RC_ICONS = resource/logo.ico
# Windows骞冲彴搴撻摼鎺?
win32:CONFIG(release, debug|release): {
LIBS += -L../CloudView3D/release -lCloudView3D
LIBS += -L../CloudUtils/release -lCloudUtils
LIBS += -L../VrUtils/release -lVrUtils
LIBS += -L../VrCommon/release -lVrCommon
LIBS += -L$$PWD/../CloudView3D/release -lCloudView3D
LIBS += -L$$PWD/../CloudUtils/release -lCloudUtils
LIBS += -L$$PWD/../VrUtils/release -lVrUtils
LIBS += -L$$PWD/../VrCommon/release -lVrCommon
}
else:win32:CONFIG(debug, debug|release): {
LIBS += -L../CloudView3D/debug -lCloudView3D
LIBS += -L../CloudUtils/debug -lCloudUtils
LIBS += -L../VrUtils/debug -lVrUtils
LIBS += -L../VrCommon/debug -lVrCommon
LIBS += -L$$PWD/../CloudView3D/debug -lCloudView3D
LIBS += -L$$PWD/../CloudUtils/debug -lCloudUtils
LIBS += -L$$PWD/../VrUtils/debug -lVrUtils
LIBS += -L$$PWD/../VrCommon/debug -lVrCommon
}
# Windows绯荤粺搴?

View File

@ -17,17 +17,17 @@
#include <QLineEdit>
#include <QRadioButton>
#include <QCheckBox>
#include <QComboBox>
#include <QDialog>
#include <QStringList>
#include <memory>
#include <QComboBox>
#include <QDialog>
#include <QStringList>
#include <memory>
#include "CloudView3D.h"
#include "PointCloudConverter.h"
#include "CloudView3D.h"
#include "PointCloudConverter.h"
class QTextEdit;
class QTableWidget;
class QCloseEvent;
class QTextEdit;
class QTableWidget;
class QCloseEvent;
/**
* @brief 点云查看器主窗口
@ -37,55 +37,55 @@ class CloudViewMainWindow : public QMainWindow
{
Q_OBJECT
public:
struct StartupFiles
{
QStringList displayFiles;
QStringList bboxFiles;
QStringList circleFiles;
QStringList rectangleFiles;
QStringList surfaceFiles;
QStringList triangleFiles;
bool sequential = false;
};
explicit CloudViewMainWindow(QWidget* parent = nullptr);
~CloudViewMainWindow() override;
bool loadStartupFiles(const StartupFiles& files);
bool loadDisplayFile(const QString& fileName);
bool loadCircleShapeFile(const QString& fileName);
bool loadRectangleShapeFile(const QString& fileName);
bool loadSurfaceShapeFile(const QString& fileName);
bool loadTriangleShapeFile(const QString& fileName);
void fitViewToContent();
public:
struct StartupFiles
{
QStringList displayFiles;
QStringList bboxFiles;
QStringList circleFiles;
QStringList rectangleFiles;
QStringList surfaceFiles;
QStringList triangleFiles;
bool sequential = false;
};
protected:
bool eventFilter(QObject* obj, QEvent* event) override;
void closeEvent(QCloseEvent* event) override;
private:
enum class StartupFileType
{
Display,
BBox,
Circle,
Rectangle,
Surface,
Triangle
};
struct StartupItem
{
StartupFileType type;
QString fileName;
};
void buildStartupSequence(const StartupFiles& files);
bool loadStartupItem(const StartupItem& item);
bool loadCurrentStartupSequenceItem();
private slots:
explicit CloudViewMainWindow(QWidget* parent = nullptr);
~CloudViewMainWindow() override;
bool loadStartupFiles(const StartupFiles& files);
bool loadDisplayFile(const QString& fileName);
bool loadCircleShapeFile(const QString& fileName);
bool loadRectangleShapeFile(const QString& fileName);
bool loadSurfaceShapeFile(const QString& fileName);
bool loadTriangleShapeFile(const QString& fileName);
void fitViewToContent();
protected:
bool eventFilter(QObject* obj, QEvent* event) override;
void closeEvent(QCloseEvent* event) override;
private:
enum class StartupFileType
{
Display,
BBox,
Circle,
Rectangle,
Surface,
Triangle
};
struct StartupItem
{
StartupFileType type;
QString fileName;
};
void buildStartupSequence(const StartupFiles& files);
bool loadStartupItem(const StartupItem& item);
bool loadCurrentStartupSequenceItem();
private slots:
/**
* @brief 打开文件
*/
@ -146,11 +146,6 @@ private slots:
*/
void onPoint2CoordChanged();
/**
* @brief 处理视角旋转角度改变事件
*/
void onViewAnglesChanged(float rotX, float rotY, float rotZ);
/**
* @brief 通过输入线号选择线
*/
@ -211,11 +206,11 @@ private slots:
void onSavePointCloud(); // 保存 txt 点云
void onSavePlyPcdCloud(); // 保存 ply/pcd 点云
void onBatchConvertTxtToPly(); // 批量转换 txt -> ply
void onConvertEulerMatrix();
void onShowCircleShape();
void onShowRectangleShape();
void onShowSurfaceShape();
void onShowTriangleShape();
void onConvertEulerMatrix();
void onShowCircleShape();
void onShowRectangleShape();
void onShowSurfaceShape();
void onShowTriangleShape();
/**
* @brief 姿态补偿计算
@ -243,11 +238,6 @@ private:
*/
QGroupBox* createFileGroup();
/**
* @brief 创建视图方向工具栏(纵向排列,位于3D视图左侧)
*/
QWidget* createViewToolbar();
/**
* @brief 创建选点测距组
*/
@ -276,14 +266,14 @@ private:
/**
* @brief 更新选点信息显示
*/
void updateSelectedPointsDisplay();
void clearMeasureResultDisplay();
void updateMeasureResultDisplay(const SelectedPointInfo& p1,
const SelectedPointInfo& p2,
float distance,
const QString& statusPrefix = QString());
/**
void updateSelectedPointsDisplay();
void clearMeasureResultDisplay();
void updateMeasureResultDisplay(const SelectedPointInfo& p1,
const SelectedPointInfo& p2,
float distance,
const QString& statusPrefix = QString());
/**
* @brief 从原始数据获取线上点(包含0,0,0)
*/
QVector<QVector3D> getOriginalLinePoints(const SelectedLineInfo& lineInfo);
@ -310,12 +300,12 @@ private:
* @return 是否成功加载到包围盒数据
*/
bool loadBoundingBoxFile(const QString& fileName);
void applyTransformToAllClouds(const QMatrix4x4& matrix);
void addGeneratedCloud(const PointCloudXYZ& cloud, const QString& name);
void showBasicShape(const QString& shapeName,
const QVector<LineSegment>& segments,
const QVector<BasicShapePoint>& points = QVector<BasicShapePoint>());
void showBasicSurface(const QString& shapeName, const QVector<SurfaceQuad>& surfaces, const QVector<LineSegment>& outlines);
void applyTransformToAllClouds(const QMatrix4x4& matrix);
void addGeneratedCloud(const PointCloudXYZ& cloud, const QString& name);
void showBasicShape(const QString& shapeName,
const QVector<LineSegment>& segments,
const QVector<BasicShapePoint>& points = QVector<BasicShapePoint>());
void showBasicSurface(const QString& shapeName, const QVector<SurfaceQuad>& surfaces, const QVector<LineSegment>& outlines);
// 点云显示控件
PointCloudGLWidget* m_glWidget;
@ -328,18 +318,13 @@ private:
QPushButton* m_btnOpenBBox;
QPushButton* m_btnClearAll;
// 视图角度输入控件
QLineEdit* m_editRotX;
QLineEdit* m_editRotY;
QLineEdit* m_editRotZ;
// 选点测距控件
QCheckBox* m_cbMeasureDistance;
QPushButton* m_btnClearPoints;
QLabel* m_lblPoint1;
QLabel* m_lblPoint2;
QLabel* m_lblDistance;
QLabel* m_lblDeltaXYZ;
QLabel* m_lblPoint1;
QLabel* m_lblPoint2;
QLabel* m_lblDistance;
QLabel* m_lblDeltaXYZ;
// 点1坐标编辑控件
QLineEdit* m_editPoint1X;
@ -407,14 +392,10 @@ private:
QTableWidget* m_linePointsTable;
QVector<QVector3D> m_currentLinePoints; // 当前线的原始点坐标
// 悬浮缩放按钮
QToolButton* m_btnZoomIn;
QToolButton* m_btnZoomOut;
// 启动参数序列显示
QVector<StartupItem> m_startupSequence;
int m_startupSequenceIndex;
bool m_startupSequentialMode;
};
// 启动参数序列显示
QVector<StartupItem> m_startupSequence;
int m_startupSequenceIndex;
bool m_startupSequentialMode;
};
#endif // CLOUD_VIEW_MAIN_WINDOW_H

File diff suppressed because it is too large Load Diff

View File

@ -65,6 +65,14 @@ int main(int argc, char* argv[])
parser.addOption(triangleOption);
parser.addOption(sequenceOption);
parser.addPositionalArgument("files", "Point cloud or segment files to load.");
if (app.arguments().contains(QStringLiteral("--help")) ||
app.arguments().contains(QStringLiteral("-h"))) {
parser.showHelp(0);
}
if (app.arguments().contains(QStringLiteral("--version")) ||
app.arguments().contains(QStringLiteral("-v"))) {
parser.showVersion();
}
parser.process(app);
CloudViewMainWindow::StartupFiles startupFiles;

View File

@ -4,6 +4,13 @@ CONFIG += c++17 staticlib
TEMPLATE = lib
TARGET = CloudView3D
win32:CONFIG(debug, debug|release) {
DESTDIR = $$PWD/debug
}
win32:CONFIG(release, debug|release) {
DESTDIR = $$PWD/release
}
win32-msvc {
QMAKE_CXXFLAGS += /utf-8
QMAKE_CXXFLAGS += /bigobj

View File

@ -4,6 +4,7 @@
#include <QOpenGLWidget>
#include <QOpenGLFunctions>
#include <QOpenGLBuffer>
#include <QOpenGLShaderProgram>
#include <QMatrix4x4>
#include <QVector3D>
#include <QQuaternion>
@ -11,8 +12,13 @@
#include <QWheelEvent>
#include <vector>
#include "CloudView3DTypes.h"
#include "VZNL_Types.h"
#include "CloudView3DTypes.h"
#include "VZNL_Types.h"
class QToolButton;
class QPushButton;
class QPinchGesture;
class QResizeEvent;
/**
* @brief 点云显示颜色枚举
@ -84,58 +90,58 @@ struct SelectedLineInfo
/**
* @brief 线段数据
*/
struct LineSegment
{
float x1, y1, z1; // 起点
float x2, y2, z2; // 终点
struct LineSegment
{
float x1, y1, z1; // 起点
float x2, y2, z2; // 终点
float r, g, b; // 颜色 (0-1)
float lineWidth; // 线宽,0 表示使用默认值(来自 RGBA 中 A > 1 的值)
LineSegment() : x1(0), y1(0), z1(0), x2(0), y2(0), z2(0), r(1), g(1), b(1), lineWidth(0) {}
LineSegment(float _x1, float _y1, float _z1, float _x2, float _y2, float _z2, float _r = 1.0f, float _g = 1.0f, float _b = 1.0f, float _lw = 0)
: x1(_x1), y1(_y1), z1(_z1), x2(_x2), y2(_y2), z2(_z2), r(_r), g(_g), b(_b), lineWidth(_lw) {}
};
/**
* @brief 面片数据
*/
struct SurfaceQuad
{
QVector3D p1, p2, p3, p4;
float r, g, b, a;
SurfaceQuad() : p1(), p2(), p3(), p4(), r(0.0f), g(0.8f), b(1.0f), a(0.5f) {}
SurfaceQuad(const QVector3D& _p1,
const QVector3D& _p2,
const QVector3D& _p3,
const QVector3D& _p4,
float _r = 0.0f,
float _g = 0.8f,
float _b = 1.0f,
float _a = 0.5f)
: p1(_p1), p2(_p2), p3(_p3), p4(_p4), r(_r), g(_g), b(_b), a(_a) {}
};
struct BasicShapePoint
{
float x, y, z;
float r, g, b;
float pointSize;
BasicShapePoint() : x(0), y(0), z(0), r(1), g(1), b(1), pointSize(8.0f) {}
BasicShapePoint(float _x,
float _y,
float _z,
float _r = 1.0f,
float _g = 1.0f,
float _b = 1.0f,
float _size = 8.0f)
: x(_x), y(_y), z(_z), r(_r), g(_g), b(_b), pointSize(_size) {}
};
/**
* @brief 姿态点数据
*
: x1(_x1), y1(_y1), z1(_z1), x2(_x2), y2(_y2), z2(_z2), r(_r), g(_g), b(_b), lineWidth(_lw) {}
};
/**
* @brief 面片数据
*/
struct SurfaceQuad
{
QVector3D p1, p2, p3, p4;
float r, g, b, a;
SurfaceQuad() : p1(), p2(), p3(), p4(), r(0.0f), g(0.8f), b(1.0f), a(0.5f) {}
SurfaceQuad(const QVector3D& _p1,
const QVector3D& _p2,
const QVector3D& _p3,
const QVector3D& _p4,
float _r = 0.0f,
float _g = 0.8f,
float _b = 1.0f,
float _a = 0.5f)
: p1(_p1), p2(_p2), p3(_p3), p4(_p4), r(_r), g(_g), b(_b), a(_a) {}
};
struct BasicShapePoint
{
float x, y, z;
float r, g, b;
float pointSize;
BasicShapePoint() : x(0), y(0), z(0), r(1), g(1), b(1), pointSize(8.0f) {}
BasicShapePoint(float _x,
float _y,
float _z,
float _r = 1.0f,
float _g = 1.0f,
float _b = 1.0f,
float _size = 8.0f)
: x(_x), y(_y), z(_z), r(_r), g(_g), b(_b), pointSize(_size) {}
};
/**
* @brief 姿态点数据
*
* 坐标系约定(右手坐标系):
* - X轴:红色,指向右
* - Y轴:绿色,指向上
@ -170,12 +176,13 @@ public:
void addPointCloud(const PointCloudXYZ& cloud, const QString& name = "");
void addPointCloud(const PointCloudXYZRGB& cloud, const QString& name = "");
void appendPointCloud(const PointCloudXYZRGB& cloud, const QString& name = "");
void clearPointClouds();
void setPointCloudColor(PointCloudColor color);
void setPointSize(float size);
void resetView();
void fitToContent();
void zoomIn();
void setPointCloudColor(PointCloudColor color);
void setPointSize(float size);
void resetView();
void fitToContent();
void zoomIn();
void zoomOut();
/**
* @brief 设置视角旋转角度(不改变缩放和平移)
@ -307,26 +314,26 @@ public:
*/
void clearLineSegments();
/**
* @brief 设置基础图形线段
*/
void setBasicShapeSegments(const QVector<LineSegment>& segments);
/**
* @brief 追加基础图形线段
*/
void appendBasicShapeSegments(const QVector<LineSegment>& segments);
/**
* @brief 追加基础图形面片
*/
void appendBasicShapeSurfaces(const QVector<SurfaceQuad>& surfaces);
void appendBasicShapePoints(const QVector<BasicShapePoint>& points);
/**
* @brief 清除基础图形线段
*/
void clearBasicShapeSegments();
/**
* @brief 设置基础图形线段
*/
void setBasicShapeSegments(const QVector<LineSegment>& segments);
/**
* @brief 追加基础图形线段
*/
void appendBasicShapeSegments(const QVector<LineSegment>& segments);
/**
* @brief 追加基础图形面片
*/
void appendBasicShapeSurfaces(const QVector<SurfaceQuad>& surfaces);
void appendBasicShapePoints(const QVector<BasicShapePoint>& points);
/**
* @brief 清除基础图形线段
*/
void clearBasicShapeSegments();
/**
* @brief 添加姿态点
@ -338,20 +345,21 @@ public:
*/
void clearPosePoints();
signals:
void pointSelected(const SelectedPointInfo& point);
void twoPointsSelected(const SelectedPointInfo& p1, const SelectedPointInfo& p2, float distance);
void measurementFinished(const SelectedPointInfo& p1,
const SelectedPointInfo& p2,
float distance,
float dx,
float dy,
float dz);
void lineSelected(const SelectedLineInfo& line);
void viewAnglesChanged(float rotX, float rotY, float rotZ);
signals:
void pointSelected(const SelectedPointInfo& point);
void twoPointsSelected(const SelectedPointInfo& p1, const SelectedPointInfo& p2, float distance);
void measurementFinished(const SelectedPointInfo& p1,
const SelectedPointInfo& p2,
float distance,
float dx,
float dy,
float dz);
void lineSelected(const SelectedLineInfo& line);
void viewAnglesChanged(float rotX, float rotY, float rotZ);
protected:
void initializeGL() override;
protected:
bool event(QEvent* event) override;
void initializeGL() override;
void resizeGL(int w, int h) override;
void paintGL() override;
void mousePressEvent(QMouseEvent* event) override;
@ -360,6 +368,7 @@ protected:
void wheelEvent(QWheelEvent* event) override;
void mouseDoubleClickEvent(QMouseEvent* event) override;
void keyPressEvent(QKeyEvent* event) override;
void resizeEvent(QResizeEvent* event) override;
private:
struct PointCloudData
@ -455,31 +464,68 @@ private:
};
void computeBoundingBox();
void setCurrentColor(PointCloudColor color);
void setColorByIndex(int colorIndex); // 根据索引设置颜色
void updateProjection(const QMatrix4x4& modelView);
float fittedCameraDistance(float padding = 1.05f) const;
float minimumCameraDistance() const;
QVector3D colorForIndex(int colorIndex) const;
SelectedPointInfo pickPoint(int screenX, int screenY);
void drawSelectedPoints();
void drawMeasurementLine();
void drawAxis();
void drawSelectedLine(); // 绘制选中的线
void drawLineSegments(); // 绘制线段
void drawBasicShapeSurfaces(); // 绘制基础图形面片
void drawBasicShapeSegments(); // 绘制基础图形
void drawBasicShapePoints();
void drawLineSegmentList(const QVector<LineSegment>& segments);
void drawPosePoints(); // 绘制姿态点
void drawSelectedLine(); // 绘制选中的线
void drawLineSegments(); // 绘制线段
void drawBasicShapeSurfaces(); // 绘制基础图形面片
void drawBasicShapeSegments(); // 绘制基础图形
void drawBasicShapePoints();
void drawLineSegmentList(const QVector<LineSegment>& segments);
void drawPosePoints(); // 绘制姿态点
void drawAxisLabels(); // 绘制坐标轴 XYZ 标注
void uploadToVBO(PointCloudData& data); // 上传数据到 VBO
void releaseVBO(PointCloudData& data); // 释放 VBO 资源
// GLES2 shader 渲染
bool ensureShader();
void drawCloud(PointCloudData& data, float pointSize);
void drawPrimitives(const QMatrix4x4& mvp,
const float* positions,
int vertexCount,
GLenum mode,
const float* colors,
const QVector3D& uniformColor,
float pointSize,
float alpha,
bool depthTest);
void resetRenderState();
// 覆盖控件:左侧竖向视图按钮 / 左下角旋转角度 / 右侧缩放
void createOverlayControls();
void repositionOverlayControls();
void showViewAngleDialog();
void updateViewAngleDisplay();
bool handlePinchGesture(QPinchGesture* gesture);
std::vector<PointCloudData> m_pointClouds;
QMatrix4x4 m_projection;
QMatrix4x4 m_view;
QMatrix4x4 m_model;
QMatrix4x4 m_mvp; // 当前帧的模型视图投影矩阵(点云主渲染用)
float m_distance;
float m_rotationX;
// GLES2 shader 渲染资源
QOpenGLShaderProgram* m_shader;
QOpenGLBuffer m_dynamicVbo; // 动态叠加图元(选中点/线/轴/姿态等)的临时 VBO
bool m_shaderReady;
GLint m_mvpLocation;
GLint m_positionLocation;
GLint m_colorLocation;
GLint m_pointSizeLocation;
GLint m_alphaLocation;
GLint m_useVertexColorLocation;
GLint m_uniformColorLocation;
float m_distance;
float m_pinchStartDistance;
float m_rotationX;
float m_rotationY;
float m_rotationZ;
QQuaternion m_rotation; // 使用四元数存储旋转状态
@ -510,12 +556,19 @@ private:
int m_colorIndex; // 颜色轮换索引
static const int COLOR_COUNT = 7; // 可用颜色数量
// 线段和姿态点数据
QVector<LineSegment> m_lineSegments;
QVector<LineSegment> m_basicShapeSegments;
QVector<SurfaceQuad> m_basicShapeSurfaces;
QVector<BasicShapePoint> m_basicShapePoints;
QVector<PosePoint> m_posePoints;
};
// 线段和姿态点数据
QVector<LineSegment> m_lineSegments;
QVector<LineSegment> m_basicShapeSegments;
QVector<SurfaceQuad> m_basicShapeSurfaces;
QVector<BasicShapePoint> m_basicShapePoints;
QVector<PosePoint> m_posePoints;
// 覆盖控件
QWidget* m_viewToolbar; // 左侧竖向视图按钮容器
QVector<QToolButton*> m_viewButtons;
QPushButton* m_viewAngleButton; // 左下角旋转角度显示按钮
QToolButton* m_zoomInButton;
QToolButton* m_zoomOutButton;
};
#endif // POINT_CLOUD_GL_WIDGET_H

File diff suppressed because it is too large Load Diff

View File

@ -11,18 +11,9 @@ CloudView.file = CloudView/CloudView.pro
# 添加子项目
SUBDIRS += \
VrCommon \
VrUtils
!equals(TARGET_APP, "ParkingSpaceGuideView") {
SUBDIRS += \
CloudUtils \
DataUtils
}
win32-msvc:!equals(TARGET_APP, "ParkingSpaceGuideView") {
SUBDIRS += \
CloudView3D \
CloudView
VrUtils \
CloudView3D \
CloudView
}
# 设置依赖关系

View File

@ -1,10 +1,17 @@
#CONFIG -= qt
TEMPLATE = lib
CONFIG += staticlib
CONFIG += c++17
# You can make your code fail to compile if it uses deprecated APIs.
TEMPLATE = lib
CONFIG += staticlib
CONFIG += c++17
win32:CONFIG(debug, debug|release) {
DESTDIR = $$PWD/debug
}
win32:CONFIG(release, debug|release) {
DESTDIR = $$PWD/release
}
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

View File

@ -6,9 +6,16 @@ DEFINES += TINYXML2_EXPORT
DEFINES += HAVE_SNPRINTF
DEFINES += LOG4CPP_HAVE_SSTREAM=1
DEFINES += VR_UTILS_EXPORTS
CONFIG += c++11
# Unix平台特定配置
CONFIG += c++11
win32:CONFIG(debug, debug|release) {
DESTDIR = $$PWD/debug
}
win32:CONFIG(release, debug|release) {
DESTDIR = $$PWD/release
}
# Unix平台特定配置
unix:!macx {
DEFINES += LOG4CPP_HAVE_UNISTD_H
# 确保所有符号导出(对于静态库)