summaryrefslogtreecommitdiffstats
path: root/src/corelib/CMakeLists.txt
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-07-16 14:22:37 +0200
committerLeander Beernaert <leander.beernaert@qt.io>2019-07-18 08:05:58 +0000
commit3212f1b8662b5e5483a0185c22820e2d14593aba (patch)
treecd4fade474dd814609343a2e84c0c882db05d00b /src/corelib/CMakeLists.txt
parent341ccc3b590d0a06157f29ce9237bc111e8cebf8 (diff)
Add special case handling for corelib mimetypes resources
We have to treat the resources from mimetypes in corelibs specially as they are reused for two test cases. Since we no longer use the qrc files, we have wrapped the relevant code in a function that can be called for every target that depends on it. This change also corrects formatting for the generate CMake code regarding resource commands. Change-Id: I50a05c81151d75aefc9ca165f5ffeb9f5cd77162 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/CMakeLists.txt')
-rw-r--r--src/corelib/CMakeLists.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index c901169735..d74a38f51a 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -1037,11 +1037,13 @@ extend_target(Core CONDITION QT_FEATURE_mimetype
)
# Resources:
-set_source_files_properties("mimetypes/mime/packages/freedesktop.org.xml"
- PROPERTIES alias "freedesktop.org.xml")
-add_qt_resource(Core "mimetypes" PREFIX "/qt-project.org/qmime/packages" BASE "mimetypes" FILES
- mime/packages/freedesktop.org.xml)
-
+# special case begin
+# We can't specify the resources directly as we have unit tests that
+# depend on these as well and we no longer support the use of hand
+# edited qrc files.
+include(${CMAKE_CURRENT_SOURCE_DIR}/mimetypes/mimetypes_resources.cmake)
+corelib_add_mimetypes_resources(Core)
+# special case end
extend_target(Core CONDITION WASM
SOURCES