summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2021-03-26 23:45:08 +0100
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2021-03-26 23:45:08 +0100
commit0422d67b9d5f1f3ca68ae389d4f1136b352f9aab (patch)
tree6e76a5f4214bec24004ce054ef702f1122782559
parent25f342e606c78e3da390ace708aebb50485ab9bf (diff)
CMake: Fix Qt resource files with CMake 3.20
Fixes https://bugs.launchpad.net/mixxx/+bug/1921549.
-rw-r--r--CMakeLists.txt9
1 files changed, 4 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index be67c340d0..d365f39f05 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1612,15 +1612,14 @@ add_dependencies(mixxx-test mixxx-testdata)
#
# Resources
#
-add_library(mixxx-qrc OBJECT EXCLUDE_FROM_ALL res/mixxx.qrc)
-set_target_properties(mixxx-qrc PROPERTIES AUTORCC ON)
-
# Add resources to mixxx and mixxx-test binaries, not the mixxx-lib static
# library. Doing this would require initialization using Q_INIT_RESOURCE()
# calls that are not present at the moment. Further information can be found
# at: https://doc.qt.io/qt5/resources.html#using-resources-in-a-library
-target_sources(mixxx PRIVATE $<TARGET_OBJECTS:mixxx-qrc>)
-target_sources(mixxx-test PRIVATE $<TARGET_OBJECTS:mixxx-qrc>)
+target_sources(mixxx PRIVATE res/mixxx.qrc)
+set_target_properties(mixxx PROPERTIES AUTORCC ON)
+target_sources(mixxx-test PRIVATE res/mixxx.qrc)
+set_target_properties(mixxx-test PROPERTIES AUTORCC ON)
file(READ src/_version.h MIXXX_VERSION_FILECONTENT)
string(REGEX REPLACE "^.*#define MIXXX_VERSION \"(.*)\".*$" "\\1" MIXXX_VERSION "${MIXXX_VERSION_FILECONTENT}")