blob: 729ac3933a05ceb2700b259fba5e684624983a27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_qmimedatabase LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
if(NOT QT_FEATURE_private_tests)
return()
endif()
#####################################################################
## tst_qmimedatabase-xml Test:
#####################################################################
qt_internal_add_test(tst_qmimedatabase-xml
SOURCES
../tst_qmimedatabase.h
tst_qmimedatabase-xml.cpp
LIBRARIES
Qt::Concurrent
Qt::CorePrivate
)
# Resources:
# the freedesktop resources are handled manually below via mimetypes_resources.cmake
#set(mimetypes_resource_files
#"mime/packages/freedesktop.org.xml"
#)
set(testdata_resource_files
"../add-extension.xml"
"../circular-inheritance.xml"
"../invalid-magic1.xml"
"../invalid-magic2.xml"
"../invalid-magic3.xml"
"../magic-and-hierarchy.foo"
"../magic-and-hierarchy.xml"
"../magic-and-hierarchy2.foo"
"../qml-again.xml"
"../test.qml"
"../text-x-objcsrc.xml"
"../text-plain-subclass.xml"
"../webm-glob-deleteall.xml"
"../yast2-metapackage-handler-mimetypes.xml"
)
qt_internal_add_resource(tst_qmimedatabase-xml "testdata"
PREFIX
"/qt-project.org/qmime"
BASE
".."
FILES
${testdata_resource_files}
)
qt_internal_add_resource(tst_qmimedatabase-xml "testfiles"
PREFIX
"/files"
FILES
"../test.txt"
"../test.qml"
)
set(corelib_source_dir ../../../../../../src/corelib)
include(${corelib_source_dir}/mimetypes/mimetypes_resources.cmake)
corelib_add_mimetypes_resources(tst_qmimedatabase-xml)
## Scopes:
#####################################################################
qt_internal_extend_target(tst_qmimedatabase-xml CONDITION GCC
COMPILE_OPTIONS
-W
-Wall
-Wextra
-Wno-long-long
-Wnon-virtual-dtor
-Wshadow
)
qt_internal_extend_target(tst_qmimedatabase-xml CONDITION UNIX AND NOT APPLE AND NOT QNX
DEFINES
USE_XDG_DATA_DIRS
)
|