diff options
-rw-r--r-- | .qmake.conf | 5 | ||||
-rw-r--r-- | mkspecs/features/qscxmlcpp.prf | 34 | ||||
-rw-r--r-- | scxml-tools.pro | 17 | ||||
-rw-r--r-- | src/qscxmlcpp/qscxmlcpp.cpp | 4 | ||||
-rw-r--r-- | src/qscxmlcpp/qscxmlcpp.pro | 9 | ||||
-rw-r--r-- | src/qscxmllib/qscxmllib.pri | 16 | ||||
-rw-r--r-- | src/qscxmllib/qscxmllib.pro | 29 | ||||
-rw-r--r-- | src/qscxmllib/scxmlcppdumper.cpp | 2 | ||||
-rw-r--r-- | src/qscxmllib/scxmlcppdumper.h | 2 | ||||
-rw-r--r-- | src/qscxmllib/scxmldumper.h | 2 | ||||
-rw-r--r-- | src/qscxmllib/scxmlparser.h | 2 | ||||
-rw-r--r-- | src/qscxmlparse/qscxmlparse.cpp | 4 | ||||
-rw-r--r-- | src/qscxmlparse/qscxmlparse.pro | 10 | ||||
-rw-r--r-- | src/qscxmlserver/qscxmlserver.cpp | 4 | ||||
-rw-r--r-- | src/qscxmlserver/qscxmlserver.pro | 9 | ||||
-rw-r--r-- | src/src.pro | 7 | ||||
-rw-r--r-- | sync.profile | 21 | ||||
-rw-r--r-- | tests/auto/auto.pro | 3 | ||||
-rw-r--r-- | tests/auto/cmake/CMakeLists.txt | 16 | ||||
-rw-r--r-- | tests/auto/cmake/cmake.pro | 6 | ||||
-rw-r--r-- | tests/cppgen/cppgen.pro | 7 | ||||
-rw-r--r-- | tests/cppgen/tst_cppgen.cpp | 2 | ||||
-rw-r--r-- | tests/scion/scion.pro | 8 | ||||
-rw-r--r-- | tests/scion/tst_scion.cpp | 2 | ||||
-rw-r--r-- | tests/testCpp/out.h | 2 | ||||
-rw-r--r-- | tests/testCpp/testCpp.pro | 6 | ||||
-rw-r--r-- | tests/tests.pro | 3 |
27 files changed, 159 insertions, 73 deletions
diff --git a/.qmake.conf b/.qmake.conf new file mode 100644 index 0000000..28e9cfd --- /dev/null +++ b/.qmake.conf @@ -0,0 +1,5 @@ +load(qt_build_config) +CONFIG += qt_example_installs +CONFIG += warning_clean + +MODULE_VERSION = 5.4.0 diff --git a/mkspecs/features/qscxmlcpp.prf b/mkspecs/features/qscxmlcpp.prf new file mode 100644 index 0000000..d747763 --- /dev/null +++ b/mkspecs/features/qscxmlcpp.prf @@ -0,0 +1,34 @@ +qtPrepareTool(QMAKE_QSCXMLCPP, qscxmlcpp) + +isEmpty(QSCXMLCPP_DIR):QSCXMLCPP_DIR = . + +qscxmlcpp.commands = $$QMAKE_QSCXMLCPP -name-qobjects ${QMAKE_FILE_IN} +qscxmlcpp.depends = ${QMAKE_FILE_IN} +qscxmlcpp.output = $$QSCXMLCPP_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)} +qscxmlcpp.input = STATECHARTS +qscxmlcpp.variable_out = QSCXMLCPP_HEADERS +qscxmlcpp.CONFIG += no_link target_predeps +qscxmlcpp.name = QSCXMLCPP ${QMAKE_FILE_IN} +QMAKE_EXTRA_COMPILERS += qscxmlcpp + +load(moc) +qscxmlcpp_moc.input = QSCXMLCPP_HEADERS +qscxmlcpp_moc.commands = $$moc_header.commands +qscxmlcpp_moc.output = $$moc_header.output +qscxmlcpp_moc.variable_out = $$moc_header.variable_out +qscxmlcpp_moc.dependency_type = $$moc_header.dependency_type +qscxmlcpp_moc.name = sc_$$moc_header.name +QMAKE_EXTRA_COMPILERS += qscxmlcpp_moc + +qscxmlcpp_sm.name = QScxmlCpp Cpp +qscxmlcpp_sm.input = STATECHARTS +qscxmlcpp_sm.variable_out = GENERATED_SOURCES +qscxmlcpp_sm.commands = $$escape_expand(\\n) # force creation of rule +qscxmlcpp_sm.output = $$QSCXMLCPP_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)} +QMAKE_EXTRA_COMPILERS += qscxmlcpp_sm + +!isEmpty(STATECHARTS) { + INCLUDEPATH += $$absolute_path($$QSCXMLCPP_DIR, $$OUT_PWD) + INCLUDEPATH += $$shadowed($$_PRO_FILE_PWD_) + INCLUDEPATH += $$_PRO_FILE_PWD_ +} diff --git a/scxml-tools.pro b/scxml-tools.pro index 3a34fe5..dc20b0e 100644 --- a/scxml-tools.pro +++ b/scxml-tools.pro @@ -1,7 +1,14 @@ +load(qt_parts) +FEATURES += \ + mkspecs/features/qscxmlcpp.prf -TEMPLATE = subdirs -CONFIG += ordered +features.files = $$FEATURES +features.path = $$[QT_HOST_DATA]/mkspecs/features/ -SUBDIRS += \ - src \ - tests +INSTALLS += features + +OTHER_FILES += \ + $$FEATURES \ + .qmake.conf \ + sync.profile \ + .gitignore diff --git a/src/qscxmlcpp/qscxmlcpp.cpp b/src/qscxmlcpp/qscxmlcpp.cpp index 59be572..265d9f8 100644 --- a/src/qscxmlcpp/qscxmlcpp.cpp +++ b/src/qscxmlcpp/qscxmlcpp.cpp @@ -16,8 +16,8 @@ ** from Digia Plc. ****************************************************************************/ -#include "../qscxmllib/scxmlparser.h" -#include "../qscxmllib/scxmlcppdumper.h" +#include <QScxmlLib/scxmlparser.h> +#include <QScxmlLib/scxmlcppdumper.h> #include <QCoreApplication> #include <QFile> diff --git a/src/qscxmlcpp/qscxmlcpp.pro b/src/qscxmlcpp/qscxmlcpp.pro index 88d86e4..d71223c 100644 --- a/src/qscxmlcpp/qscxmlcpp.pro +++ b/src/qscxmlcpp/qscxmlcpp.pro @@ -1,15 +1,12 @@ -QT += core qml -QT -= gui +option(host_build) +QT += core qml qscxmllib TARGET = qscxmlcpp CONFIG += console c++11 -CONFIG -= app_bundle - -TEMPLATE = app HEADERS += SOURCES += \ qscxmlcpp.cpp -include (../qscxmllib/qscxmllib.pri) +load(qt_tool) diff --git a/src/qscxmllib/qscxmllib.pri b/src/qscxmllib/qscxmllib.pri deleted file mode 100644 index eb330e4..0000000 --- a/src/qscxmllib/qscxmllib.pri +++ /dev/null @@ -1,16 +0,0 @@ -QT += core_private -HEADERS += \ - $$PWD/scxmlparser.h \ - $$PWD/scxmlstatetable.h \ - $$PWD/scxmlglobals.h \ - $$PWD/scxmldumper.h \ - $$PWD/scxmlstatetable_p.h \ - $$PWD/scxmlcppdumper.h - -SOURCES += \ - $$PWD/scxmlparser.cpp \ - $$PWD/scxmlstatetable.cpp \ - $$PWD/scxmldumper.cpp \ - $$PWD/scxmlcppdumper.cpp -DEFINES += QT_NO_CAST_FROM_ASCII -INCLUDEPATH += $$PWD/.. diff --git a/src/qscxmllib/qscxmllib.pro b/src/qscxmllib/qscxmllib.pro index 5edcb7f..d2d99a7 100644 --- a/src/qscxmllib/qscxmllib.pro +++ b/src/qscxmllib/qscxmllib.pro @@ -1,17 +1,24 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2014-12-08T11:32:41 -# -#------------------------------------------------- +TARGET = QScxmlLib +MODULE = qscxmllib -QT += core qml +QT += core core-private qml -QT -= gui +load(qt_module) -TARGET = qscxmllib CONFIG += c++11 -DEFINES += SCXML_LIBRARY +DEFINES += SCXML_LIBRARY \ + QT_NO_CAST_FROM_ASCII -TEMPLATE = lib +HEADERS += \ + scxmlparser.h \ + scxmlstatetable.h \ + scxmlglobals.h \ + scxmldumper.h \ + scxmlstatetable_p.h \ + scxmlcppdumper.h -include(qscxmllib.pri) +SOURCES += \ + scxmlparser.cpp \ + scxmlstatetable.cpp \ + scxmldumper.cpp \ + scxmlcppdumper.cpp diff --git a/src/qscxmllib/scxmlcppdumper.cpp b/src/qscxmllib/scxmlcppdumper.cpp index 222ddd9..e1de698 100644 --- a/src/qscxmllib/scxmlcppdumper.cpp +++ b/src/qscxmllib/scxmlcppdumper.cpp @@ -446,7 +446,7 @@ protected: }; const char *headerStart = - "#include <qscxmllib/scxmlstatetable.h>\n" + "#include <QScxmlLib/scxmlstatetable.h>\n" "\n"; } // anonymous namespace diff --git a/src/qscxmllib/scxmlcppdumper.h b/src/qscxmllib/scxmlcppdumper.h index 22086f2..8c8f02c 100644 --- a/src/qscxmllib/scxmlcppdumper.h +++ b/src/qscxmllib/scxmlcppdumper.h @@ -34,7 +34,7 @@ struct SCXML_EXPORT CppDumpOptions : public DumpOptions bool nameQObjects; }; -class CppDumper +class SCXML_EXPORT CppDumper { public: CppDumper(QTextStream &headerStream, QTextStream &cppStream, const QString &headerName, const CppDumpOptions &options) diff --git a/src/qscxmllib/scxmldumper.h b/src/qscxmllib/scxmldumper.h index 16a5887..690ede3 100644 --- a/src/qscxmllib/scxmldumper.h +++ b/src/qscxmllib/scxmldumper.h @@ -34,7 +34,7 @@ struct SCXML_EXPORT ScxmlDumpOptions : public DumpOptions }; -class ScxmlDumper +class SCXML_EXPORT ScxmlDumper { public: ScxmlDumper(QXmlStreamWriter &stream) : s(stream) { } diff --git a/src/qscxmllib/scxmlparser.h b/src/qscxmllib/scxmlparser.h index 967068a..9b9eff2 100644 --- a/src/qscxmllib/scxmlparser.h +++ b/src/qscxmllib/scxmlparser.h @@ -115,7 +115,7 @@ struct ParsingOptions { ParsingOptions() { } }; -class ScxmlParser +class SCXML_EXPORT ScxmlParser { public: typedef std::function<QByteArray(const QString &, bool &, ScxmlParser *parser)> LoaderFunction; diff --git a/src/qscxmlparse/qscxmlparse.cpp b/src/qscxmlparse/qscxmlparse.cpp index c7c2ee7..ff1d042 100644 --- a/src/qscxmlparse/qscxmlparse.cpp +++ b/src/qscxmlparse/qscxmlparse.cpp @@ -16,8 +16,8 @@ ** from Digia Plc. ****************************************************************************/ -#include "../qscxmllib/scxmlparser.h" -#include "../qscxmllib/scxmldumper.h" +#include <QScxmlLib/scxmlparser.h> +#include <QScxmlLib/scxmldumper.h> #include <QCoreApplication> #include <QFile> diff --git a/src/qscxmlparse/qscxmlparse.pro b/src/qscxmlparse/qscxmlparse.pro index fd99769..8ba266c 100644 --- a/src/qscxmlparse/qscxmlparse.pro +++ b/src/qscxmlparse/qscxmlparse.pro @@ -1,14 +1,12 @@ -QT += core qml -QT -= gui +option(host_build) +QT += core qml qscxmllib TARGET = qscxmlparse CONFIG += console c++11 -TEMPLATE = app - HEADERS += SOURCES += \ - qscxmlparse.cpp \ + qscxmlparse.cpp -include (../qscxmllib/qscxmllib.pri) +load(qt_tool) diff --git a/src/qscxmlserver/qscxmlserver.cpp b/src/qscxmlserver/qscxmlserver.cpp index 0f9189f..631c97f 100644 --- a/src/qscxmlserver/qscxmlserver.cpp +++ b/src/qscxmlserver/qscxmlserver.cpp @@ -16,8 +16,8 @@ ** from Digia Plc. ****************************************************************************/ -#include "../qscxmllib/scxmlparser.h" -#include "../qscxmllib/scxmldumper.h" +#include <QScxmlLib/scxmlparser.h> +#include <QScxmlLib/scxmldumper.h> #include <QCoreApplication> #include <QCoreApplication> diff --git a/src/qscxmlserver/qscxmlserver.pro b/src/qscxmlserver/qscxmlserver.pro index ea77072..cf1bed8 100644 --- a/src/qscxmlserver/qscxmlserver.pro +++ b/src/qscxmlserver/qscxmlserver.pro @@ -1,14 +1,13 @@ -QT += core qml +option(host_build) +QT += core qml qscxmllib QT -= gui network TARGET = qscxmlserver CONFIG += console c++11 -TEMPLATE = app - HEADERS += SOURCES += \ - qscxmlserver.cpp \ + qscxmlserver.cpp -include (../qscxmllib/qscxmllib.pri) +load(qt_tool) diff --git a/src/src.pro b/src/src.pro index 091dbc2..9fa70b8 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,9 +1,12 @@ - TEMPLATE = subdirs -CONFIG += ordered SUBDIRS += \ qscxmllib \ qscxmlparse \ qscxmlserver \ qscxmlcpp + +qscxmlparse.depends = qscxmllib +qscxmlserver.depends = qscxmllib +qscxmlcpp.depends = qscxmllib +imports.depends = qscxmllib diff --git a/sync.profile b/sync.profile new file mode 100644 index 0000000..003a44d --- /dev/null +++ b/sync.profile @@ -0,0 +1,21 @@ +%modules = ( # path to module name map + "QScxmlLib" => "$basedir/src/qscxmllib", +); +%moduleheaders = ( # restrict the module headers to those found in relative path +); +%classnames = ( +); +%deprecatedheaders = ( +); +# Module dependencies. +# Every module that is required to build this module should have one entry. +# Each of the module version specifiers can take one of the following values: +# - A specific Git revision. +# - any git symbolic ref resolvable from the module's repository (e.g. "refs/heads/master" to track master branch) +# - an empty string to use the same branch under test (dependencies will become "refs/heads/master" if we are in the master branch) +# +%dependencies = ( + "qtbase" => "", + "qtdeclarative" => "", + "qtxmlpatterns" => "", +); diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro new file mode 100644 index 0000000..a80d9e8 --- /dev/null +++ b/tests/auto/auto.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS += cmake + diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt new file mode 100644 index 0000000..221e8f3 --- /dev/null +++ b/tests/auto/cmake/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 2.8) + +project(qmake_cmake_files) + +enable_testing() + +find_package(Qt5Core REQUIRED) +find_package(Qt5Qml REQUIRED) +find_package(Qt5Quick REQUIRED) + + +include("${_Qt5CTestMacros}") + +test_module_includes( + QScxmlLib +) diff --git a/tests/auto/cmake/cmake.pro b/tests/auto/cmake/cmake.pro new file mode 100644 index 0000000..aa6da6a --- /dev/null +++ b/tests/auto/cmake/cmake.pro @@ -0,0 +1,6 @@ +# Cause make to do nothing. +TEMPLATE = subdirs + +CMAKE_QT_MODULES_UNDER_TEST = qscxmllib + +CONFIG += ctest_testcase diff --git a/tests/cppgen/cppgen.pro b/tests/cppgen/cppgen.pro index c513bcd..f37225d 100644 --- a/tests/cppgen/cppgen.pro +++ b/tests/cppgen/cppgen.pro @@ -1,13 +1,13 @@ -include (../../src/qscxmllib/qscxmllib.pri) +option(host_build) -QT += testlib +QT += testlib qscxmllib CONFIG += testcase QT += core qml QT -= gui TARGET = tst_cppgen -CONFIG += console +CONFIG += console c++11 CONFIG -= app_bundle TEMPLATE = app @@ -15,3 +15,4 @@ TEMPLATE = app SOURCES += \ tst_cppgen.cpp +load(qt_tool) diff --git a/tests/cppgen/tst_cppgen.cpp b/tests/cppgen/tst_cppgen.cpp index d5b5772..0b4fd11 100644 --- a/tests/cppgen/tst_cppgen.cpp +++ b/tests/cppgen/tst_cppgen.cpp @@ -18,7 +18,7 @@ #include <QtTest/QtTest> -#include <qscxmllib/scxmlcppdumper.h> +#include <QScxmlLib/scxmlcppdumper.h> using namespace Scxml; diff --git a/tests/scion/scion.pro b/tests/scion/scion.pro index 1f53b13..ddf4e14 100644 --- a/tests/scion/scion.pro +++ b/tests/scion/scion.pro @@ -1,13 +1,13 @@ -include (../../src/qscxmllib/qscxmllib.pri) +option(host_build) -QT += testlib +QT += testlib qscxmllib CONFIG += testcase QT += core qml QT -= gui TARGET = tst_scion -CONFIG += console +CONFIG += console c++11 CONFIG -= app_bundle TEMPLATE = app @@ -19,3 +19,5 @@ SOURCES += \ HEADERS += \ $$PWD/../3rdparty/scion.h + +load(qt_tool) diff --git a/tests/scion/tst_scion.cpp b/tests/scion/tst_scion.cpp index c8b7b8e..1a193e3 100644 --- a/tests/scion/tst_scion.cpp +++ b/tests/scion/tst_scion.cpp @@ -19,7 +19,7 @@ #include <QtTest/QtTest> #include <QJsonDocument> -#include <qscxmllib/scxmlparser.h> +#include <QScxmlLib/scxmlparser.h> #include "../3rdparty/scion.h" diff --git a/tests/testCpp/out.h b/tests/testCpp/out.h index 6435c53..0fb5141 100644 --- a/tests/testCpp/out.h +++ b/tests/testCpp/out.h @@ -1,4 +1,4 @@ -#include <qscxmllib/scxmlstatetable.h> +#include <QScxmlLib/scxmlstatetable.h> class StateMachine : public Scxml::StateTable { Q_OBJECT diff --git a/tests/testCpp/testCpp.pro b/tests/testCpp/testCpp.pro index 907f798..af0ba9d 100644 --- a/tests/testCpp/testCpp.pro +++ b/tests/testCpp/testCpp.pro @@ -1,4 +1,6 @@ -QT += core qml +option(host_build) + +QT += core qml qscxmllib QT -= gui TARGET = testCpp @@ -16,4 +18,4 @@ SOURCES += \ OTHER_FILES += genTestSxcml.py -include (../../src/qscxmllib/qscxmllib.pri) +load(qt_tool) diff --git a/tests/tests.pro b/tests/tests.pro index ede5bdf..71f8909 100644 --- a/tests/tests.pro +++ b/tests/tests.pro @@ -1,7 +1,8 @@ TEMPLATE = subdirs -#CONFIG += ordered +CONFIG += ordered no_docs_target SUBDIRS += \ + auto \ cppgen \ scion \ testCpp |