diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json index 55bdc8a940a..3e26a5f0f20 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json @@ -311,6 +311,10 @@ "source": "../common/qmlcomponents.tpl", "target": "%{ProjectDirectory}/qmlcomponents" }, + { + "source": "../common/insight.tpl", + "target": "%{ProjectDirectory}/insight" + }, { "source": "../common/main.qml", "target": "%{ProjectDirectory}/main.qml" diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json index 82ebe92ff09..ea5f9ef671b 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json @@ -306,6 +306,10 @@ "source": "../common/qmlcomponents.tpl", "target": "%{ProjectDirectory}/qmlcomponents" }, + { + "source": "../common/insight.tpl", + "target": "%{ProjectDirectory}/insight" + }, { "source": "../common/main.qml", "target": "%{ProjectDirectory}/main.qml" diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl index a76765daee9..086b6bc2e9d 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.21.1) set(BUILD_QDS_COMPONENTS ON CACHE BOOL "Build design studio components") +option(LINK_INSIGHT "Link Qt Insight Tracker library" ON) project(%{ProjectName}App LANGUAGES CXX) @@ -41,6 +42,10 @@ endif () include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules) +if (LINK_INSIGHT) + include(${CMAKE_CURRENT_SOURCE_DIR}/insight) +endif () + install(TARGETS ${CMAKE_PROJECT_NAME} BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/insight.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/insight.tpl new file mode 100644 index 00000000000..8245e31f0d9 --- /dev/null +++ b/share/qtcreator/qmldesigner/studio_templates/projects/common/insight.tpl @@ -0,0 +1,19 @@ +### This file is automatically generated by Qt Design Studio. +### Do not change + +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qtinsight.conf) + if (QT_VERSION GREATER_EQUAL 6.5.0) + find_package(Qt6 REQUIRED COMPONENTS InsightTracker) + + qt_add_resources(${CMAKE_PROJECT_NAME} "configuration" + PREFIX "/" + FILES + qtinsight.conf + ) + target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE + Qt6::InsightTracker + ) + else() + message(WARNING "You need Qt 6.5.0 or newer to build the application.") + endif() +endif() diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json index d29b1eec730..58fb3f30ef7 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json @@ -304,6 +304,10 @@ "source": "../common/qmlcomponents.tpl", "target": "%{ProjectDirectory}/qmlcomponents" }, + { + "source": "../common/insight.tpl", + "target": "%{ProjectDirectory}/insight" + }, { "source": "../common/main.qml", "target": "%{ProjectDirectory}/main.qml" diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json index ac83550c398..d79059a6a5a 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json @@ -263,6 +263,10 @@ "source": "../common/qmlcomponents.tpl", "target": "%{ProjectDirectory}/qmlcomponents" }, + { + "source": "../common/insight.tpl", + "target": "%{ProjectDirectory}/insight" + }, { "source": "../common/main.qml", "target": "%{ProjectDirectory}/main.qml" diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json index 23cc6163c18..cd837cf5688 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json @@ -260,6 +260,10 @@ "source": "../common/qmlcomponents.tpl", "target": "%{ProjectDirectory}/qmlcomponents" }, + { + "source": "../common/insight.tpl", + "target": "%{ProjectDirectory}/insight" + }, { "source": "../common/main.qml", "target": "%{ProjectDirectory}/main.qml" diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json index 222b09a1ba0..abef03752e2 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json @@ -260,6 +260,10 @@ "source": "../common/qmlcomponents.tpl", "target": "%{ProjectDirectory}/qmlcomponents" }, + { + "source": "../common/insight.tpl", + "target": "%{ProjectDirectory}/insight" + }, { "source": "../common/main.qml", "target": "%{ProjectDirectory}/main.qml"