summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@theqtcompany.com>2016-04-12 11:51:24 +0200
committerJarek Kobus <jaroslaw.kobus@theqtcompany.com>2016-04-12 19:08:44 +0000
commitfcd9af589dbf5bc9dcf100c7fa8ebdfed7d88243 (patch)
treea976814d40267943678e1ea069839376ce4c793d
parent75d4660d89b11a31350eddaa21f1889bd576036c (diff)
Use common .pri file for building qscxmlc and its test
That way we ensure we really compile it in the same way. This e.g. defines BUILD_QSCXMLC while building the test. Change-Id: Iffe0e9f1d3cbd543bb69049bb889226212ea49a8 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
-rw-r--r--tests/auto/qscxmlc/qscxmlc.pro16
-rw-r--r--tools/qscxmlc/qscxmlc.pri32
-rw-r--r--tools/qscxmlc/qscxmlc.pro36
3 files changed, 39 insertions, 45 deletions
diff --git a/tests/auto/qscxmlc/qscxmlc.pro b/tests/auto/qscxmlc/qscxmlc.pro
index 9a7d462..2024920 100644
--- a/tests/auto/qscxmlc/qscxmlc.pro
+++ b/tests/auto/qscxmlc/qscxmlc.pro
@@ -7,19 +7,9 @@ TEMPLATE = app
RESOURCES += tst_qscxmlc.qrc
-SOURCES += \
- $$PWD/tst_qscxmlc.cpp \
- $$PWD/../../../tools/qscxmlc/qscxmlc.cpp \
- $$PWD/../../../tools/qscxmlc/generator.cpp \
- $$PWD/../../../tools/qscxmlc/scxmlcppdumper.cpp
-
-HEADERS += \
- $$PWD/../../../tools/qscxmlc/qscxmlc.h \
- $$PWD/../../../tools/qscxmlc/moc.h \
- $$PWD/../../../tools/qscxmlc/generator.h \
- $$PWD/../../../tools/qscxmlc/outputrevision.h \
- $$PWD/../../../tools/qscxmlc/utils.h \
- $$PWD/../../../tools/qscxmlc/scxmlcppdumper.h
+include(../../../tools/qscxmlc/qscxmlc.pri)
INCLUDEPATH += ../../../tools/qscxmlc/
+SOURCES += \
+ tst_qscxmlc.cpp
diff --git a/tools/qscxmlc/qscxmlc.pri b/tools/qscxmlc/qscxmlc.pri
new file mode 100644
index 0000000..17afe4b
--- /dev/null
+++ b/tools/qscxmlc/qscxmlc.pri
@@ -0,0 +1,32 @@
+DEFINES += BUILD_QSCXMLC
+
+SOURCES += \
+ $$PWD/generator.cpp \
+ $$PWD/qscxmlc.cpp \
+ $$PWD/scxmlcppdumper.cpp
+
+HEADERS += \
+ $$PWD/moc.h \
+ $$PWD/generator.h \
+ $$PWD/outputrevision.h \
+ $$PWD/qscxmlc.h \
+ $$PWD/utils.h \
+ $$PWD/scxmlcppdumper.h
+
+HEADERS += \
+ $$PWD/../../src/scxml/qscxmlparser.h \
+ $$PWD/../../src/scxml/qscxmlparser_p.h \
+ $$PWD/../../src/scxml/qscxmlglobals.h \
+ $$PWD/../../src/scxml/qscxmlexecutablecontent.h \
+ $$PWD/../../src/scxml/qscxmlexecutablecontent_p.h \
+ $$PWD/../../src/scxml/qscxmlerror.h \
+ $$PWD/../../src/scxml/qscxmltabledata.h
+
+SOURCES += \
+ $$PWD/../../src/scxml/qscxmlparser.cpp \
+ $$PWD/../../src/scxml/qscxmlexecutablecontent.cpp \
+ $$PWD/../../src/scxml/qscxmlerror.cpp \
+ $$PWD/../../src/scxml/qscxmltabledata.cpp
+
+DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
+INCLUDEPATH *= $$QT.scxml.includes $$QT.scxml_private.includes
diff --git a/tools/qscxmlc/qscxmlc.pro b/tools/qscxmlc/qscxmlc.pro
index 1dd83e2..7621eef 100644
--- a/tools/qscxmlc/qscxmlc.pro
+++ b/tools/qscxmlc/qscxmlc.pro
@@ -1,41 +1,13 @@
option(host_build)
-TARGET = qscxmlc
-CONFIG += console c++11
QT = core-private
-DEFINES += BUILD_QSCXMLC
-
-SOURCES += \
- main.cpp \
- generator.cpp \
- qscxmlc.cpp \
- scxmlcppdumper.cpp
-
-HEADERS += \
- moc.h \
- generator.h \
- outputrevision.h \
- qscxmlc.h \
- utils.h \
- scxmlcppdumper.h
+include(qscxmlc.pri)
-HEADERS += \
- $$PWD/../../src/scxml/qscxmlparser.h \
- $$PWD/../../src/scxml/qscxmlparser_p.h \
- $$PWD/../../src/scxml/qscxmlglobals.h \
- $$PWD/../../src/scxml/qscxmlexecutablecontent.h \
- $$PWD/../../src/scxml/qscxmlexecutablecontent_p.h \
- $$PWD/../../src/scxml/qscxmlerror.h \
- $$PWD/../../src/scxml/qscxmltabledata.h
+TARGET = qscxmlc
+CONFIG += console c++11
SOURCES += \
- $$PWD/../../src/scxml/qscxmlparser.cpp \
- $$PWD/../../src/scxml/qscxmlexecutablecontent.cpp \
- $$PWD/../../src/scxml/qscxmlerror.cpp \
- $$PWD/../../src/scxml/qscxmltabledata.cpp
-
-DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
-INCLUDEPATH *= $$QT.scxml.includes $$QT.scxml_private.includes
+ main.cpp
load(qt_tool)