summaryrefslogtreecommitdiffstats
path: root/src/corelib/mimetypes/mimetypes_resources.cmake
blob: 00fa4f527162d69352d79f98142c00bd311a63d4 (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
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

# List of files that need to be packaged as resources.
# This file exists solely because of unit tests that need access to this
# information as well. This was previously handled by referencing a qrc
# file with the same information

set(corelib_mimetypes_resource_file
    "${CMAKE_CURRENT_LIST_DIR}/mime/packages/freedesktop.org.xml"
)

function(corelib_add_mimetypes_resources target)
    set(source_file "${corelib_mimetypes_resource_file}")
    set_source_files_properties("${source_file}"
        PROPERTIES QT_RESOURCE_ALIAS "freedesktop.org.xml"
    )
    qt_internal_add_resource(${target} "mimetypes"
        PREFIX
            "/qt-project.org/qmime/packages"
        FILES
            "${source_file}"
    )
endfunction()