#------------------------------------------------- # # Project created by QtCreator 2021-05-06T16:39:09 # #------------------------------------------------- QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets QT +=sql TARGET = NetMonite TEMPLATE = app # The following define makes your compiler emit warnings if you use # any feature of Qt which has been marked as 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 # 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 win32{ QMAKE_CXXFLAGS+=/execution-charset:utf-8 } SOURCES += \ main.cpp \ mainwindow.cpp \ cwork.cpp \ KbdPing.cpp \ mydatabase.cpp HEADERS += \ mainwindow.h \ cwork.h \ cdevice.h \ KbdPing.h \ mydatabase.h \ CkbdPing.h \ asio_icmp_nonroot.h \ icmp_header.h \ ipv4_header.h FORMS += \ mainwindow.ui LIBS += -lboost_system linux-g++* { message("current os-compiler linux-g++") #程序中可判断此宏定义进行条件编译 DEFINES += OS_LINUX } win32-msvc* { message("current os-compiler windows-msvc") #程序中可判断此宏定义进行条件编译 DEFINES += OS_WINDOWS #设置程序的运行时字符编码 QMAKE_CXXFLAGS+=/execution-charset:utf-8 #由于Windows下一些第三方库的名称增加了“lib”,此处进行统一化处理 #各工程的pro文件中就不需要按平台条件书写,统一使用Unix、Linux的方式书写即可 } COMMON_PRI =$$PWD/../../common.pri exists($$COMMON_PRI){ include($$COMMON_PRI) }else { error("FATAL error: can not find common.pri") } RESOURCES += \ resource.qrc