mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
change MIPS32 macro to EMBEDDED to be compatibel to ARM
This commit is contained in:
parent
d427aec712
commit
9fb021245a
@ -1,13 +1,13 @@
|
||||
#here is all your app common defination and configration
|
||||
#change these path on your computer
|
||||
message(Link QQt to $${TARGET} $${QKIT_} from $${SYSNAME} $${BUILD} on $${QMAKE_HOST.os})
|
||||
equals(QMAKE_HOST.os, Darwin) {
|
||||
equals(QKIT_, macOS) {
|
||||
LIBS += -F/Users/abel/Develop/c0-buildstation/a0-qqtfoundation/$${SYSNAME}/$${BUILD}/src/bin
|
||||
LIBS += -F/Users/abel/Develop/c0-buildstation/a0-qqtfoundation/$${SYSNAME}/$${BUILD}/src/bin
|
||||
contains(DEFINES, __DARWIN__) {
|
||||
LIBS += -framework QQt
|
||||
} else: equals(QKIT_, Android) {
|
||||
LIBS += -L/Users/abel/Develop/c0-buildstation/a0-qqtfoundation/$${SYSNAME}/$${BUILD}/src/bin
|
||||
LIBS += -lQQt
|
||||
} else: equals(QKIT_, ANDROIDX86) {
|
||||
LIBS += -L/Users/abel/Develop/c0-buildstation/a0-qqtfoundation/$${SYSNAME}/$${BUILD}/src/bin
|
||||
} else: contains(DEFINES, __IOS__) {
|
||||
LIBS += -framework QQt
|
||||
} else{
|
||||
LIBS += -lQQt
|
||||
}
|
||||
} else: equals(QMAKE_HOST.os, Linux) {
|
||||
@ -32,6 +32,9 @@ can_install:equals(QKIT_, EMBEDDED) {
|
||||
}
|
||||
}
|
||||
|
||||
############
|
||||
##config defination
|
||||
############
|
||||
equals(QKIT_, macOS) {
|
||||
CONFIG += app_bundle
|
||||
}
|
||||
@ -43,3 +46,19 @@ equals(QKIT_, Android) {
|
||||
|
||||
#ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||
}
|
||||
|
||||
#equals(QKIT_, macOS) {
|
||||
# QMAKE_CFLAGS_X86_64 += -mmacosx-version-min=10.7
|
||||
# QMAKE_CXXFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64
|
||||
# msgpacklib.path = Contents/Frameworks
|
||||
# msgpacklib.files = ../myapp/3rd/msgpack-0.5.4/src/.libs/libmsgpack.3.dylib
|
||||
# evlib.path = Contents/Frameworks
|
||||
# evlib.files = ../myapp/3rd/libev-4.11/.libs/libev.4.dylib
|
||||
# QMAKE_BUNDLE_DATA += msgpacklib evlib
|
||||
# QMAKE_POST_LINK = install_name_tool -change /usr/local/lib/libmsgpack.3.dylib \
|
||||
# @executable_path/../Frameworks/libmsgpack.3.dylib \
|
||||
# myapp.app/Contents/MacOs/myapp & \
|
||||
# install_name_tool -change /usr/local/lib/libev.4.dylib \
|
||||
# @executable_path/../Frameworks/libev.4.dylib \
|
||||
# myapp.app/Contents/MacOs/myapp
|
||||
#}
|
||||
|
@ -34,9 +34,11 @@
|
||||
#include <QMouseEvent>
|
||||
#include <QUuid>
|
||||
|
||||
#ifdef __PRINTSUPPORT__
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
#include <QPrintPreviewDialog>
|
||||
#endif
|
||||
|
||||
#include <QTextFormat>
|
||||
#include <QTextTable>
|
||||
|
@ -24,12 +24,10 @@ unix:VERSION = 1.1.0
|
||||
#################################################################
|
||||
##Qt version
|
||||
QT += core gui network sql xml
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
#You need define a env variable QKIT=XX
|
||||
##target arch type
|
||||
QKIT_ = $$(QKIT)
|
||||
message($${QKIT_} Defined to $${TARGET})
|
||||
#处理文件内平台小差异
|
||||
#EMBEDDED __EMBEDDED_LINUX__
|
||||
#MIPS __MIPS_LINUX__
|
||||
#ARM __ARM_LINUX__
|
||||
@ -40,7 +38,9 @@ message($${QKIT_} Defined to $${TARGET})
|
||||
#macOS __DARWIN__
|
||||
#Android __ANDROID__
|
||||
#ANDROIDX86 __ANDROIDX86__
|
||||
#处理文件内平台小差异
|
||||
##target arch type
|
||||
QKIT_ = $$(QKIT)
|
||||
message($${QKIT_} Defined to $${TARGET})
|
||||
equals(QKIT_, EMBEDDED) {
|
||||
#embedded common macro
|
||||
DEFINES += __EMBEDDED_LINUX__
|
||||
@ -65,31 +65,37 @@ equals(QKIT_, EMBEDDED) {
|
||||
DEFINES += __DARWIN__
|
||||
} else:equals(QKIT_, iOS) {
|
||||
DEFINES += __IOS__
|
||||
} else:equals(QKIT_, iOSSimulator) {
|
||||
DEFINES += __IOS__
|
||||
} else:equals(QKIT_, Android) {
|
||||
DEFINES += __ANDROID__
|
||||
} else:equals(QKIT_, ANDROIDX86) {
|
||||
DEFINES += __ANDROIDX86__
|
||||
DEFINES += __ANDROID__
|
||||
#todo:no customplot word printer
|
||||
}
|
||||
# release open debug output
|
||||
CONFIG(debug, debug|release) {
|
||||
} else {
|
||||
DEFINES -= QT_NO_DEBUG_OUTPUT
|
||||
}
|
||||
#close win32 no using fopen_s warning
|
||||
win32 {
|
||||
win32:DEFINES += _CRT_SECURE_NO_WARNINGS #fopen fopen_s
|
||||
#this three pragma cause errors
|
||||
#QMAKE_CXXFLAGS += /wd"4819" /wd"4244" /wd"4100"
|
||||
}
|
||||
#compatible old version QQt (deperated)
|
||||
greaterThan(QT_MAJOR_VERSION, 4): DEFINES += __QT5__
|
||||
|
||||
#You need switch these more macro according to your needs.
|
||||
#if you use qextserialport, open the annotation
|
||||
#suggest: Qt5 use factory-packed, Qt4 use forming Qt5, extra use this.
|
||||
#DEFINES += __QEXTSERIALPORT__
|
||||
#if compiler QtSerialPort module manual, note this line is a good idea.
|
||||
#if compiler QtSerialPort module manual, note this line is a good idea. default: qt4 qextserialport
|
||||
lessThan(QT_MAJOR_VERSION, 5): DEFINES += __QEXTSERIALPORT__
|
||||
#to ios, use qextserialport
|
||||
contains (DEFINES, __IOS__): DEFINES += __QEXTSERIALPORT__
|
||||
contains (DEFINES, __QEXTSERIALPORT__) {
|
||||
#include ( $$PWD/network/qextserialport/qextserialport.pri )
|
||||
CONFIG += thread
|
||||
unix:DEFINES += _TTY_POSIX_
|
||||
win32:DEFINES += _TTY_WIN_
|
||||
@ -103,11 +109,9 @@ contains (DEFINES, __QEXTSERIALPORT__) {
|
||||
DEFINES += _TTY_WIN_
|
||||
}
|
||||
}
|
||||
#if you use qcustomplot, open this annotation
|
||||
DEFINES += __CUSTOMPLOT__
|
||||
#if you use qtbluetooth, open this annotation
|
||||
DEFINES += __BLUETOOTH__
|
||||
#if compiler QtBluetooth module manual, note this line is a good idea.
|
||||
#if you compiler QtBluetooth module manual, note this line is a good idea. default qt4 don't use bluetooth
|
||||
lessThan(QT_MAJOR_VERSION, 5): DEFINES -= __BLUETOOTH__
|
||||
contains (DEFINES, __BLUETOOTH__) {
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += bluetooth
|
||||
@ -115,8 +119,8 @@ contains (DEFINES, __BLUETOOTH__) {
|
||||
}
|
||||
#if you use QR encode, open this annotation
|
||||
DEFINES += __QRENCODE__
|
||||
#if you use C++11, open this annotation
|
||||
DEFINES += __CPP11__
|
||||
#if you use C++11, open this annotation. suggest: ignore
|
||||
#DEFINES += __CPP11__
|
||||
contains (DEFINES, __CPP11__) {
|
||||
#macOS gcc Qt4.8.7
|
||||
#qobject.h fatal error: 'initializer_list' file not found,
|
||||
@ -130,11 +134,24 @@ contains (DEFINES, __CPP11__) {
|
||||
#on windows mingw32? need test
|
||||
#CONFIG += c++11
|
||||
|
||||
#LibQQt need c++11 support. Please insure your compiler version.
|
||||
#compile period
|
||||
#LibQQt need c++11 support. Please ensure your compiler version.
|
||||
#LibQQt used override identifier
|
||||
#lambda also need c++11
|
||||
}
|
||||
#if you use qcustomplot, open this annotation
|
||||
#need print support
|
||||
DEFINES += __CUSTOMPLOT__
|
||||
#if you use printsupport , open this annotation
|
||||
DEFINES += __PRINTSUPPORT__
|
||||
#ios android can't support this function now
|
||||
equals(QKIT_, iOS):DEFINES -= __CUSTOMPLOT__
|
||||
equals(QKIT_, iOS):DEFINES -= __PRINTSUPPORT__
|
||||
equals(QKIT_, Android):DEFINES -= __CUSTOMPLOT__
|
||||
equals(QKIT_, Android):DEFINES -= __PRINTSUPPORT__
|
||||
contains (DEFINES, __PRINTSUPPORT__) {
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport
|
||||
}
|
||||
|
||||
|
||||
#################################################################
|
||||
##variables
|
||||
#################################################################
|
||||
@ -155,6 +172,10 @@ equals(QKIT_, MIPS32) {
|
||||
SYSNAME = Win64
|
||||
} else:equals(QKIT_, macOS) {
|
||||
SYSNAME = MacOS
|
||||
} else:equals(QKIT_, iOS) {
|
||||
SYSNAME = iOS
|
||||
} else:equals(QKIT_, iOSSimulator) {
|
||||
SYSNAME = iOS-simulator
|
||||
} else:equals(QKIT_, Android) {
|
||||
SYSNAME = Android
|
||||
} else:equals(QKIT_, ANDROIDX86) {
|
||||
|
@ -106,6 +106,17 @@ HEADERS += $$PWD/qqt.h \
|
||||
$$PWD/qqt-local.h \
|
||||
$$PWD/qqt-qt.h
|
||||
|
||||
#core
|
||||
SOURCES += \
|
||||
$$PWD/core/qqtcore.cpp \
|
||||
$$PWD/core/qqtanimation.cpp \
|
||||
$$PWD/core/qqtobjectfactory.cpp \
|
||||
$$PWD/widgets/qqtapplication.cpp
|
||||
HEADERS += \
|
||||
$$PWD/core/qqtcore.h \
|
||||
$$PWD/core/qqtanimation.h \
|
||||
$$PWD/core/qqtobjectfactory.h
|
||||
|
||||
|
||||
#network
|
||||
##websocket
|
||||
@ -130,11 +141,6 @@ HEADERS += \
|
||||
$$PWD/network/qqtmessage.h \
|
||||
$$PWD/network/qqtprotocol.h \
|
||||
$$PWD/network/qqtnetwork.h
|
||||
#serialport
|
||||
SOURCES += \
|
||||
$$PWD/network/qqtserialport.cpp
|
||||
HEADERS += \
|
||||
$$PWD/network/qqtserialport.h
|
||||
#bluetooth
|
||||
#DEFINES += __BLUETOOTH__
|
||||
contains (DEFINES, __BLUETOOTH__) {
|
||||
@ -151,11 +157,11 @@ contains (DEFINES, __BLUETOOTH__) {
|
||||
HEADERS += \
|
||||
$$PWD/network/qqtbluetoothmanager.h
|
||||
}
|
||||
#ethnet manager
|
||||
equals(QKIT_, MIPS32) {
|
||||
SOURCES += $$PWD/network/qqtethenetmanager.cpp
|
||||
HEADERS += $$PWD/network/qqtethenetmanager.h
|
||||
}
|
||||
#serialport
|
||||
SOURCES += \
|
||||
$$PWD/network/qqtserialport.cpp
|
||||
HEADERS += \
|
||||
$$PWD/network/qqtserialport.h
|
||||
#qextserialport support
|
||||
#if you use qextserialport, open the two annotation
|
||||
#DEFINES += __QEXTSERIALPORT__
|
||||
@ -173,20 +179,33 @@ contains (DEFINES, __QEXTSERIALPORT__) {
|
||||
win32:SOURCES += $$PWD/network/qextserialport/win_qextserialport.cpp
|
||||
}
|
||||
|
||||
#ethnet(+wifi) manager
|
||||
#arm mips
|
||||
#TODO: +wince +android +ios +macOS? +win? +linux?
|
||||
equals(QKIT_, EMBEDDED) {
|
||||
SOURCES += $$PWD/network/qqtethenetmanager.cpp
|
||||
HEADERS += $$PWD/network/qqtethenetmanager.h
|
||||
SOURCES += $$PWD/frame/qqtwifiwidget.cpp
|
||||
HEADERS += $$PWD/frame/qqtwifiwidget.h
|
||||
FORMS += $$PWD/frame/qqtwifiwidget.ui
|
||||
}
|
||||
|
||||
#core
|
||||
SOURCES += \
|
||||
$$PWD/core/qqtcore.cpp \
|
||||
$$PWD/core/qqtanimation.cpp \
|
||||
$$PWD/core/qqtobjectfactory.cpp \
|
||||
$$PWD/widgets/qqtapplication.cpp
|
||||
HEADERS += \
|
||||
$$PWD/core/qqtcore.h \
|
||||
$$PWD/core/qqtanimation.h \
|
||||
$$PWD/core/qqtobjectfactory.h
|
||||
|
||||
#dmmu preview
|
||||
#arm mips
|
||||
#TODO: +wince +android +ios +macOS +win +linux
|
||||
equals(QKIT_, EMBEDDED) {
|
||||
SOURCES += $$PWD/dmmu/dmmu.c
|
||||
HEADERS += $$PWD/dmmu/dmmu.h \
|
||||
$$PWD/dmmu/jz_cim.h \
|
||||
$$PWD/dmmu/graphics.h \
|
||||
$$PWD/dmmu/hal.h
|
||||
SOURCES += $$PWD/frame/qqtpreviewwidget.cpp
|
||||
HEADERS += $$PWD/frame/qqtpreviewwidget.h
|
||||
FORMS += $$PWD/frame/qqtpreviewwidget.ui
|
||||
}
|
||||
|
||||
#customplot
|
||||
#need print support
|
||||
#DEFINES += __CUSTOMPLOT__
|
||||
contains (DEFINES, __CUSTOMPLOT__) {
|
||||
message (qcustomplot is used in $${TARGET})
|
||||
@ -197,60 +216,38 @@ contains (DEFINES, __CUSTOMPLOT__) {
|
||||
$$PWD/customplot/qcustomplot.cpp
|
||||
HEADERS += $$PWD/customplot/qcpdocumentobject.h \
|
||||
$$PWD/customplot/qcustomplot.h
|
||||
equals(QKIT_, Android) {
|
||||
SOURCES -= $$PWD/customplot/qcpdocumentobject.cpp \
|
||||
$$PWD/customplot/qcustomplot.cpp
|
||||
HEADERS -= $$PWD/customplot/qcpdocumentobject.h \
|
||||
$$PWD/customplot/qcustomplot.h
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#dmmu
|
||||
equals(QKIT_, MIPS32) {
|
||||
SOURCES += $$PWD/dmmu/dmmu.c
|
||||
HEADERS += $$PWD/dmmu/dmmu.h \
|
||||
$$PWD/dmmu/jz_cim.h \
|
||||
$$PWD/dmmu/graphics.h \
|
||||
$$PWD/dmmu/hal.h
|
||||
#printsupport
|
||||
#DEFINES += __PRINTSUPPORT__
|
||||
contains (DEFINES, __PRINTSUPPORT__) {
|
||||
SOURCES += $$PWD/printsupport/qqtprinter.cpp
|
||||
HEADERS += $$PWD/printsupport/qqtprinter.h
|
||||
SOURCES += \
|
||||
$$PWD/frame/qqtword.cpp
|
||||
HEADERS += \
|
||||
$$PWD/frame/qqtword.h
|
||||
}
|
||||
|
||||
#frame
|
||||
equals(QKIT_, MIPS32) {
|
||||
SOURCES += $$PWD/frame/qqtpreviewwidget.cpp \
|
||||
$$PWD/frame/qqtwifiwidget.cpp
|
||||
HEADERS += $$PWD/frame/qqtpreviewwidget.h \
|
||||
$$PWD/frame/qqtwifiwidget.h
|
||||
FORMS += $$PWD/frame/qqtpreviewwidget.ui \
|
||||
$$PWD/frame/qqtwifiwidget.ui
|
||||
}
|
||||
SOURCES += \
|
||||
$$PWD/frame/qqtprogressdialog.cpp \
|
||||
$$PWD/frame/qqtpassworddialog.cpp \
|
||||
$$PWD/frame/qqtframe.cpp \
|
||||
$$PWD/frame/qqtdialog.cpp \
|
||||
$$PWD/frame/qqtmsgbox.cpp \
|
||||
$$PWD/frame/qqtinput.cpp \
|
||||
$$PWD/frame/qqtword.cpp
|
||||
$$PWD/frame/qqtinput.cpp
|
||||
HEADERS += \
|
||||
$$PWD/frame/qqtprogressdialog.h \
|
||||
$$PWD/frame/qqtpassworddialog.h \
|
||||
$$PWD/frame/qqtframe.h \
|
||||
$$PWD/frame/qqtdialog.h \
|
||||
$$PWD/frame/qqtmsgbox.h \
|
||||
$$PWD/frame/qqtinput.h \
|
||||
$$PWD/frame/qqtword.h
|
||||
$$PWD/frame/qqtinput.h
|
||||
FORMS += \
|
||||
$$PWD/frame/qqtprogressdialog.ui \
|
||||
$$PWD/frame/qqtpassworddialog.ui \
|
||||
$$PWD/frame/qqtdialog.ui \
|
||||
$$PWD/frame/qqtinput.ui \
|
||||
$$PWD/frame/qqtmsgbox.ui
|
||||
equals(QKIT_, Android) {
|
||||
SOURCES -= $$PWD/frame/qqtword.cpp
|
||||
HEADERS -= $$PWD/frame/qqtword.h
|
||||
}
|
||||
|
||||
|
||||
#gui
|
||||
@ -271,6 +268,8 @@ HEADERS += \
|
||||
|
||||
|
||||
#multimedia
|
||||
#arm mips
|
||||
#TODO: +wince +android +ios +macOS +win +linux
|
||||
SOURCES += $$PWD/multimedia/qqtmplayer.cpp
|
||||
HEADERS += $$PWD/multimedia/qqtmplayer.h
|
||||
|
||||
@ -295,16 +294,6 @@ HEADERS += $$PWD/pluginwatcher/qqtpluginwatcher.h \
|
||||
$$PWD/pluginwatcher/qdevicewatcher.h \
|
||||
$$PWD/pluginwatcher/qdevicewatcher_p.h
|
||||
|
||||
#printsupport
|
||||
SOURCES += $$PWD/printsupport/qqtprinter.cpp
|
||||
HEADERS += $$PWD/printsupport/qqtprinter.h
|
||||
equals(QKIT_, Android) {
|
||||
SOURCES -= $$PWD/printsupport/qqtprinter.cpp
|
||||
HEADERS -= $$PWD/printsupport/qqtprinter.h
|
||||
} else:equals(QKIT_, iOS) {
|
||||
SOURCES -= $$PWD/printsupport/qqtprinter.cpp
|
||||
HEADERS -= $$PWD/printsupport/qqtprinter.h
|
||||
}
|
||||
|
||||
#sql
|
||||
SOURCES += $$PWD/sql/qqtsql.cpp
|
||||
|
Loading…
x
Reference in New Issue
Block a user