1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00

fix a link error:in qmake pro can't set SOURCE=XX in the back row. += is correct

This commit is contained in:
tianduanrui 2017-10-25 16:57:50 +08:00
parent 6445684f2e
commit 1dececdc99
5 changed files with 51 additions and 43 deletions

View File

@ -1,18 +1,28 @@
#here is all your app common defination and configration
#change these path on your computer
QQT_OUT_PWD=$${OUT_PWD}/../../src/bin
message (QQt is building here : $${QQT_OUT_PWD})
message(Link QQt to $${TARGET} $${QKIT_} at $${QT_VERSION} $${SYSNAME} $${BUILD} on $${QMAKE_HOST.os})
LIBS += -L$${QQT_OUT_PWD}
message(Link QQt to $${TARGET} $${QKIT_} \
at $${QT_VERSION} $${SYSNAME} $${BUILD} \
on $${QMAKE_HOST.os})
equals(QMAKE_HOST.os, Darwin) {
contains(DEFINES, __DARWIN__|__IOS__) {
LIBS += -F$${QQT_OUT_PWD}
LIBS += -framework QQt
} else{
LIBS += -lQQt
}
} else: contains(QMAKE_HOST.os, Linux|Windows) {
LIBS += -lQQt
BUILDROOT = /Users/abel/Develop/c0-buildstation
} else: equals(QMAKE_HOST.os, Linux) {
BUILDROOT = /home/abel/Develop/c0-buildstation
} else: equals(QMAKE_HOST.os, Windows) {
BUILDROOT = C:/Users/Administrator/Develop/c0-build
}
QQT_OUT_PWD = QQt/$${QT_VERSION}/$${SYSNAME}/$${BUILD}/src
QQT_OUT_BIN = $${QQT_OUT_PWD}/$${DESTDIR}
QQT_LIB_PWD = $$BUILDROOT/$$QQT_OUT_BIN
message (QQt Build: $$QQT_LIB_PWD)
contains(DEFINES, __DARWIN__) {
LIBS += -F$${QQT_LIB_PWD}
LIBS += -framework QQt
} else {
LIBS += -L$${QQT_LIB_PWD}
LIBS += -l QQt
}
############

View File

@ -3,15 +3,11 @@
#include <QtCore/qglobal.h>
#include "qqt-local.h"
#if defined(QQT_LIBRARY)
# define QQTSHARED_EXPORT Q_DECL_EXPORT
#else
# define QQTSHARED_EXPORT Q_DECL_IMPORT
#endif
#include "qqtgui.h"
#include "qqt-qt.h"
#include "qqtgui.h"
#if defined(__WIN__) || defined(__WIN64__)
#include "qqtwin.h"
#elif defined(__LINUX__) || defined(__LINUX64__)

View File

@ -10,6 +10,28 @@
TARGET = QQt
TEMPLATE = lib
##default build dll but some occasion
CONFIG += dll
#QQt library export (DLL) static lib is not needed
DEFINES += QQT_LIBRARY
##special lib lib_bundle/staticlib
equals(QKIT_, macOS) {
CONFIG += lib_bundle
} else:equals(QKIT_, iOS) {
DEFINES -= QQT_LIBRARY
CONFIG -= dll
CONFIG += staticlib
} else:equals(QKIT_, WIN) {
#when Qt is static by mingw32 building 5.9.1
equals(QT_VERSION, 5.9.1){
DEFINES -= QQT_LIBRARY
CONFIG -= dll
CONFIG += staticlib
}
}
#CONFIG += debug_and_release
#CONFIG += build_all
#################################################################
##project version
#################################################################
@ -56,24 +78,7 @@ greaterThan(QT_MAJOR_VERSION, 4): {
#################################################################
##project source
#################################################################
#QQT LIBRARY (DLL)
DEFINES += QQT_LIBRARY
CONFIG += dll
include ($$PWD/qqt_header.pri)
equals(QKIT_, macOS) {
CONFIG += dll
CONFIG += lib_bundle
} else:equals(QKIT_, iOS) {
DEFINES -= QQT_LIBRARY
CONFIG -= dll
CONFIG += staticlib
} else:equals(QKIT_, WIN) {
DEFINES -= QQT_LIBRARY
CONFIG -= dll
CONFIG += staticlib
}
#CONFIG += debug_and_release
#CONFIG += build_all
include ($$PWD/qqt_source.pri)

View File

@ -150,7 +150,7 @@ equals(QKIT_, MIPS32) {
}
message(Build $${TARGET} at $${QT_VERSION} $${SYSNAME} $${BUILD})
message(Build $${TARGET} on $${QMAKE_HOST.os})
lessThan(QT_MAJOR_VERSION, 5):DEFINES += nullptr=0
################################################################
##build cache
################################################################
@ -219,13 +219,13 @@ contains (DEFINES, __CPP11__) {
#if you use qcustomplot, open this annotation
#need print support
DEFINES += __CUSTOMPLOT__
contains(QKIT_, iOS|iOSSimulator|ANDROID|ANDROIDX86) {
contains(QKIT_, iOS||iOSSimulator||ANDROID||ANDROIDX86) {
DEFINES -= __CUSTOMPLOT__
}
#if you use printsupport , open this annotation
DEFINES += __PRINTSUPPORT__
#ios android can't support this function now
contains(QKIT_, iOS|iOSSimulator|ANDROID|ANDROIDX86) {
contains(QKIT_, iOS||iOSSimulator||ANDROID||ANDROIDX86) {
DEFINES -= __PRINTSUPPORT__
}
contains (DEFINES, __PRINTSUPPORT__) {
@ -246,9 +246,6 @@ contains (DEFINES, __WEBSOCKETSUPPORT__) {
equals (QKIT_, iOSSimulator):{
QMAKE_CXXFLAGS +=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
}
#############
##libraries
#############
win32 {
LIBS += -luser32
}else: unix {

View File

@ -282,7 +282,7 @@ FORMS += \
$$PWD/widgets/qqttreewidget.ui
#exquisite
SOURCES = \
SOURCES += \
$$PWD/exquisite/qqtcustomspeedmeter.cpp \
$$PWD/exquisite/qqtframelesshelper.cpp \
$$PWD/exquisite/qqtframelesshelperprivate.cpp \
@ -297,7 +297,7 @@ SOURCES = \
$$PWD/exquisite/qqtshadoweffectwidget.cpp \
$$PWD/exquisite/qqtpopeffectdialog.cpp \
$$PWD/exquisite/qqtcustomeffectprogressbar.cpp
HEADERS = \
HEADERS += \
$$PWD/exquisite/qqtcustomspeedmeter.h \
$$PWD/exquisite/qqtframelesshelper.h \
$$PWD/exquisite/qqtframelesshelperprivate.h \