summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/CMakeLists.txt2
-rw-r--r--tests/tests.qbs1
-rw-r--r--tests/tools/qml-ast2dot/CMakeLists.txt13
-rw-r--r--tests/tools/qml-ast2dot/qml-ast2dot.qbs21
4 files changed, 36 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 71bf9613a5..3e961231ca 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,4 +1,4 @@
add_subdirectory(auto)
add_subdirectory(manual)
-# add_subdirectory(tools)
+add_subdirectory(tools/qml-ast2dot)
add_subdirectory(unit)
diff --git a/tests/tests.qbs b/tests/tests.qbs
index adabf7a398..fc634c93d0 100644
--- a/tests/tests.qbs
+++ b/tests/tests.qbs
@@ -5,6 +5,7 @@ Project {
references: [
"auto/auto.qbs",
"manual/manual.qbs",
+ "tools/qml-ast2dot/qml-ast2dot.qbs",
"unit/unit.qbs",
]
}
diff --git a/tests/tools/qml-ast2dot/CMakeLists.txt b/tests/tools/qml-ast2dot/CMakeLists.txt
new file mode 100644
index 0000000000..5e4a852243
--- /dev/null
+++ b/tests/tools/qml-ast2dot/CMakeLists.txt
@@ -0,0 +1,13 @@
+add_qtc_executable(qml_ast2dot
+ BUILD_DEFAULT OFF
+ DEPENDS Qt5::Core Qt5::Gui QmlJS
+ SOURCES main.cpp
+)
+
+extend_qtc_executable(qml_ast2dot
+ PROPERTIES
+ OUTPUT_NAME "qml-ast2dot"
+ LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+)
diff --git a/tests/tools/qml-ast2dot/qml-ast2dot.qbs b/tests/tools/qml-ast2dot/qml-ast2dot.qbs
new file mode 100644
index 0000000000..2fbf3676c9
--- /dev/null
+++ b/tests/tools/qml-ast2dot/qml-ast2dot.qbs
@@ -0,0 +1,21 @@
+import qbs.FileInfo
+
+CppApplication {
+ Depends { name: "QmlJS" }
+ Depends { name: "Qt.gui" }
+
+ cpp.cxxLanguageVersion: "c++17"
+ consoleApplication: true
+ targetName: "qml-ast2dot"
+ builtByDefault: false
+
+ files: [
+ "main.cpp"
+ ]
+
+ destinationDirectory: FileInfo.joinPaths(
+ FileInfo.path(project.buildDirectory + '/'
+ + FileInfo.relativePath(project.ide_source_tree,
+ sourceDirectory)),
+ "qml-ast2dot")
+}