Make Qt project work on non-Mac systems
This commit is contained in:
parent
6bc8ff153e
commit
b37c5f6fc5
1 changed files with 13 additions and 5 deletions
18
ObjQt.pro
18
ObjQt.pro
|
@ -35,9 +35,17 @@ SOURCES += common/OFString+QString.mm \
|
||||||
QtWidgets/QtApplication.mm \
|
QtWidgets/QtApplication.mm \
|
||||||
QtWidgets/QtWidget.mm
|
QtWidgets/QtWidget.mm
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += $$system("objfw-config --cppflags --objcflags --cxxflags")
|
OBJCFLAGS += $$system("objfw-config --cppflags --objcflags --cxxflags")
|
||||||
QMAKE_CXXFLAGS_WARN_ON = -Wall \
|
OBJCFLAGS_WARN_ON = -Wall \
|
||||||
-Werror \
|
-Werror \
|
||||||
-Wsemicolon-before-method-body \
|
-Wsemicolon-before-method-body \
|
||||||
-Wobjc-missing-property-synthesis
|
-Wobjc-missing-property-synthesis
|
||||||
|
|
||||||
|
# qmake treats .mm files as C++ on Mac, but as C on everything else
|
||||||
|
macx:QMAKE_CXXFLAGS += $$OBJCFLAGS
|
||||||
|
macx:QMAKE_CXXFLAGS_WARN_ON = $$OBJCFLAGS_WARN_ON
|
||||||
|
!macx:QMAKE_CC = clang++
|
||||||
|
!macx:QMAKE_CFLAGS += -std=c++11 $$OBJCFLAGS
|
||||||
|
!macx:QMAKE_CFLAGS_WARN_ON = $$OBJCFLAGS_WARN_ON
|
||||||
|
|
||||||
LIBS += $$system("objfw-config --ldflags --libs")
|
LIBS += $$system("objfw-config --ldflags --libs")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue