QT -= gui CONFIG += c++14 console CONFIG -= app_bundle QMAKE_LFLAGS += -no-pie # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS QMAKE_LFLAGS += -no-pie # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += main.cpp INCLUDEPATH += /opt/ros/kinetic/include INCLUDEPATH += /usr/include/pcl-1.8 INCLUDEPATH += /usr/include/pcl-1.10 INCLUDEPATH += /usr/include/pcl-1.12 INCLUDEPATH += /usr/include/pcl-1.7 INCLUDEPATH += /usr/include/eigen3 INCLUDEPATH += /usr/include/vtk-6.2 unix:LIBS += -lpcl_common\ -lpcl_features\ -lpcl_filters\ -lpcl_io\ -lpcl_io_ply\ -lpcl_kdtree\ -lpcl_keypoints\ -lpcl_octree\ -lpcl_outofcore\ -lpcl_people\ -lpcl_recognition\ -lpcl_registration\ -lpcl_sample_consensus\ -lpcl_search\ -lpcl_segmentation\ -lpcl_surface\ -lpcl_tracking\ -lpcl_visualization #INCLUDEPATH += $$PWD/../../../include/ #LIBS += -L$$PWD/../../../bin/ -lxmlparam -lmodulecomm -livlog -livfault # 获取Ubuntu的版本信息 UBUNTU_VERSION = $$system(lsb_release -rs) # 移除可能存在的空白字符 UBUNTU_VERSION = $$replace(UBUNTU_VERSION, \\s+, ) # 打印版本信息(可选) message(Ubuntu version: $$UBUNTU_VERSION) # 判断版本并定义宏 contains(UBUNTU_VERSION, 20\\.04$) { INCLUDEPATH += /usr/include/vtk-6.3 LIBS += -lvtkCommonExecutionModel-6.3 -lvtkCommonCore-6.3 -lvtkRenderingLOD-6.3 -lvtkRenderingCore-6.3 \ -lvtkFiltersSources-6.3 } contains(UBUNTU_VERSION, 20\\.04$) { INCLUDEPATH += /usr/include/vtk-7.1 LIBS += -lvtkCommonExecutionModel-7.1 -lvtkCommonCore-7.1 -lvtkRenderingLOD-7.1 -lvtkRenderingCore-7.1 \ -lvtkFiltersSources-7.1 } else:contains(UBUNTU_VERSION, 22\\.04$) { INCLUDEPATH += /usr/include/vtk-9.1 LIBS += -lvtkCommonExecutionModel-9.1 -lvtkCommonCore-9.1 -lvtkRenderingLOD-9.1 -lvtkRenderingCore-9.1 \ -lvtkFiltersSources-9.1 } else:contains(UBUNTU_VERSION, 24\\.04$) { DEFINES += UBUNTU_24_04 message(Defining UBUNTU_24_04) } else { message(Unknown Ubuntu version: $$UBUNTU_VERSION) } LIBS += -lboost_system