From 8e0bf6e05b9af7553800a52e4685044d9c4ae734 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 28 Sep 2023 08:02:13 +0200 Subject: [PATCH] Make tests/manual/qtabletevent/device_information build standalone It's very hard to test on Android otherwise: Creator isn't cooperating well enough with Android Studio / SDK manager with where stuff is installed, qmake doesn't build an apk, and qt-cmake-standalone-test doesn't work wth Android either. Renamed the executable to tablet_device_info so it's a bit less confusing on device launcher UIs. Task-number: QTBUG-86297 Change-Id: I3bb7f816e43f8df4183be1c0866e228befa9e8d9 Reviewed-by: Oliver Eftevaag --- .../device_information/CMakeLists.txt | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/manual/qtabletevent/device_information/CMakeLists.txt b/tests/manual/qtabletevent/device_information/CMakeLists.txt index d712429119..a0583b1f93 100644 --- a/tests/manual/qtabletevent/device_information/CMakeLists.txt +++ b/tests/manual/qtabletevent/device_information/CMakeLists.txt @@ -1,16 +1,20 @@ -# Copyright (C) 2022 The Qt Company Ltd. +# Copyright (C) 2023 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -##################################################################### -## device_information Binary: -##################################################################### +project(tablet_device_info) +cmake_minimum_required(VERSION 3.19) -qt_internal_add_manual_test(device_information - GUI - SOURCES - main.cpp - tabletwidget.cpp tabletwidget.h - LIBRARIES - Qt::Gui - Qt::Widgets +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) + +qt_add_executable(tablet_device_info + main.cpp + tabletwidget.h tabletwidget.cpp +) + +set_target_properties(tablet_device_info PROPERTIES + AUTOMOC TRUE +) + +target_link_libraries(tablet_device_info PUBLIC + Qt::Widgets )