diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-01-25 18:13:55 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-02-09 14:26:10 +0100 |
commit | 6b99363813f11fdf6207b731fbfea77acabb68d6 (patch) | |
tree | e320c9fc1c31d2e5db217484b7ba549eee30a57b /tests | |
parent | b18b44600c9eeb1577331dc71119c2942e929419 (diff) |
Add CMake build system
Adjust qmake build system where needed.
Pick-to: 6.1
Change-Id: I7983fdafc59be4f2bba5b0397f4551a1be95ede3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests')
21 files changed, 135 insertions, 5 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..a8f031a --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1 @@ +qt_build_tests() diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt new file mode 100644 index 0000000..2e9eb0c --- /dev/null +++ b/tests/auto/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(bodymovin) +add_subdirectory(imports) diff --git a/tests/auto/bodymovin/CMakeLists.txt b/tests/auto/bodymovin/CMakeLists.txt new file mode 100644 index 0000000..a87b0ab --- /dev/null +++ b/tests/auto/bodymovin/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(shape) diff --git a/tests/auto/bodymovin/shape/CMakeLists.txt b/tests/auto/bodymovin/shape/CMakeLists.txt new file mode 100644 index 0000000..b68e1b7 --- /dev/null +++ b/tests/auto/bodymovin/shape/CMakeLists.txt @@ -0,0 +1,11 @@ +add_subdirectory(shapelayer) +add_subdirectory(rect) +add_subdirectory(ellipse) +add_subdirectory(fill) +add_subdirectory(stroke) +add_subdirectory(path) +add_subdirectory(trimpath) +add_subdirectory(transform) +add_subdirectory(shapetransform) +add_subdirectory(repeater) +add_subdirectory(repeatertransform) diff --git a/tests/auto/bodymovin/shape/ellipse/CMakeLists.txt b/tests/auto/bodymovin/shape/ellipse/CMakeLists.txt new file mode 100644 index 0000000..85ccec0 --- /dev/null +++ b/tests/auto/bodymovin/shape/ellipse/CMakeLists.txt @@ -0,0 +1,9 @@ +qt_internal_add_test(tst_ellipse + SOURCES + tst_bmellipse.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test + Qt::BodymovinPrivate +) diff --git a/tests/auto/bodymovin/shape/fill/CMakeLists.txt b/tests/auto/bodymovin/shape/fill/CMakeLists.txt new file mode 100644 index 0000000..4aebb0a --- /dev/null +++ b/tests/auto/bodymovin/shape/fill/CMakeLists.txt @@ -0,0 +1,9 @@ +qt_internal_add_test(tst_fill + SOURCES + tst_bmfill.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test + Qt::BodymovinPrivate +) diff --git a/tests/auto/bodymovin/shape/path/CMakeLists.txt b/tests/auto/bodymovin/shape/path/CMakeLists.txt new file mode 100644 index 0000000..fa926e9 --- /dev/null +++ b/tests/auto/bodymovin/shape/path/CMakeLists.txt @@ -0,0 +1,9 @@ +qt_internal_add_test(tst_path + SOURCES + tst_bmpath.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test + Qt::BodymovinPrivate +) diff --git a/tests/auto/bodymovin/shape/rect/CMakeLists.txt b/tests/auto/bodymovin/shape/rect/CMakeLists.txt new file mode 100644 index 0000000..ba5cadb --- /dev/null +++ b/tests/auto/bodymovin/shape/rect/CMakeLists.txt @@ -0,0 +1,9 @@ +qt_internal_add_test(tst_rect + SOURCES + tst_bmrect.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test + Qt::BodymovinPrivate +) diff --git a/tests/auto/bodymovin/shape/repeater/CMakeLists.txt b/tests/auto/bodymovin/shape/repeater/CMakeLists.txt new file mode 100644 index 0000000..3185737 --- /dev/null +++ b/tests/auto/bodymovin/shape/repeater/CMakeLists.txt @@ -0,0 +1,9 @@ +qt_internal_add_test(tst_repeater + SOURCES + tst_bmrepeater.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test + Qt::BodymovinPrivate +) diff --git a/tests/auto/bodymovin/shape/repeatertransform/CMakeLists.txt b/tests/auto/bodymovin/shape/repeatertransform/CMakeLists.txt new file mode 100644 index 0000000..a50f3c8 --- /dev/null +++ b/tests/auto/bodymovin/shape/repeatertransform/CMakeLists.txt @@ -0,0 +1,9 @@ +qt_internal_add_test(tst_repeatertransform + SOURCES + tst_bmrepeatertransform.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test + Qt::BodymovinPrivate +) diff --git a/tests/auto/bodymovin/shape/shapelayer/CMakeLists.txt b/tests/auto/bodymovin/shape/shapelayer/CMakeLists.txt new file mode 100644 index 0000000..34543ce --- /dev/null +++ b/tests/auto/bodymovin/shape/shapelayer/CMakeLists.txt @@ -0,0 +1,8 @@ +qt_internal_add_test(tst_shapelayer + SOURCES + tst_bmshapelayer.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::BodymovinPrivate +) diff --git a/tests/auto/bodymovin/shape/shapetransform/CMakeLists.txt b/tests/auto/bodymovin/shape/shapetransform/CMakeLists.txt new file mode 100644 index 0000000..f0676ea --- /dev/null +++ b/tests/auto/bodymovin/shape/shapetransform/CMakeLists.txt @@ -0,0 +1,9 @@ +qt_internal_add_test(tst_shapetransform + SOURCES + tst_bmshapetransform.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test + Qt::BodymovinPrivate +) diff --git a/tests/auto/bodymovin/shape/stroke/CMakeLists.txt b/tests/auto/bodymovin/shape/stroke/CMakeLists.txt new file mode 100644 index 0000000..ecf5cc2 --- /dev/null +++ b/tests/auto/bodymovin/shape/stroke/CMakeLists.txt @@ -0,0 +1,9 @@ +qt_internal_add_test(tst_stroke + SOURCES + tst_bmstroke.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test + Qt::BodymovinPrivate +) diff --git a/tests/auto/bodymovin/shape/transform/CMakeLists.txt b/tests/auto/bodymovin/shape/transform/CMakeLists.txt new file mode 100644 index 0000000..1694f0f --- /dev/null +++ b/tests/auto/bodymovin/shape/transform/CMakeLists.txt @@ -0,0 +1,9 @@ +qt_internal_add_test(tst_transform + SOURCES + tst_bmbasictransform.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test + Qt::BodymovinPrivate +) diff --git a/tests/auto/bodymovin/shape/trimpath/CMakeLists.txt b/tests/auto/bodymovin/shape/trimpath/CMakeLists.txt new file mode 100644 index 0000000..825dd55 --- /dev/null +++ b/tests/auto/bodymovin/shape/trimpath/CMakeLists.txt @@ -0,0 +1,9 @@ +qt_internal_add_test(tst_trimpath + SOURCES + tst_bmtrimpath.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::GuiPrivate + Qt::Test + Qt::BodymovinPrivate +) diff --git a/tests/auto/imports/CMakeLists.txt b/tests/auto/imports/CMakeLists.txt new file mode 100644 index 0000000..0d1f486 --- /dev/null +++ b/tests/auto/imports/CMakeLists.txt @@ -0,0 +1,17 @@ +qt_internal_add_test(tst_imports + GUI + QMLTEST + SOURCES + tst_imports.cpp + PUBLIC_LIBRARIES + Qt::Quick + TESTDATA + data/tst_main.qml +) + +qt_internal_add_resource(tst_imports "imports" + PREFIX + "/" + FILES + data/rec_pos_col_opa.json +) diff --git a/tests/auto/imports/rec_pos_col_opa.json b/tests/auto/imports/data/rec_pos_col_opa.json index 35245f4..35245f4 100644 --- a/tests/auto/imports/rec_pos_col_opa.json +++ b/tests/auto/imports/data/rec_pos_col_opa.json diff --git a/tests/auto/imports/tst_main.qml b/tests/auto/imports/data/tst_main.qml index 6e59da9..ae8f7e5 100644 --- a/tests/auto/imports/tst_main.qml +++ b/tests/auto/imports/data/tst_main.qml @@ -43,7 +43,7 @@ Item { x: 0 y: 0 quality: LottieAnimation.HighQuality - source: "rec_pos_col_opa.json" + source: "qrc:/data/rec_pos_col_opa.json" onFinished: { bmAnim.start(); diff --git a/tests/auto/imports/imports.pro b/tests/auto/imports/imports.pro index 6b78b4c..0b47c9c 100644 --- a/tests/auto/imports/imports.pro +++ b/tests/auto/imports/imports.pro @@ -13,7 +13,7 @@ DEFINES += QT_DEPRECATED_WARNINGS #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ - main.cpp + tst_imports.cpp RESOURCES += qml.qrc diff --git a/tests/auto/imports/qml.qrc b/tests/auto/imports/qml.qrc index c821f84..e0d3ea8 100644 --- a/tests/auto/imports/qml.qrc +++ b/tests/auto/imports/qml.qrc @@ -1,6 +1,6 @@ <RCC> <qresource prefix="/"> - <file>rec_pos_col_opa.json</file> - <file>tst_main.qml</file> + <file>data/rec_pos_col_opa.json</file> + <file>data/tst_main.qml</file> </qresource> </RCC> diff --git a/tests/auto/imports/main.cpp b/tests/auto/imports/tst_imports.cpp index a7e37a8..4833174 100644 --- a/tests/auto/imports/main.cpp +++ b/tests/auto/imports/tst_imports.cpp @@ -1,3 +1,3 @@ #include <QtQuickTest/quicktest.h> -QUICK_TEST_MAIN("tst_main.qml"); +QUICK_TEST_MAIN(imports); |