forked from qt-creator/qt-creator
QmlDesigner: Add insight tracker linking
- Add proper insight tracker library linking to the QtDS CMake template. - Add CMake option LINK_INSIGHT to turn insight linking off - Add check for Qt version 6.5 and insight configuration available Task-number: QDS-9354 Change-Id: I606364743cce61c281d3faae929df50ba95892b7 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
ca300e9eb8
commit
f0b2cc0836
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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})
|
||||
|
||||
@@ -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()
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user