blob: 07179b8188d2a2269c7e23c98d48163449ea9c71 (
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
|
From 1c54cb0164a7f59b06366d25b07597bbb6cb1b5d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Tue, 26 Sep 2017 19:50:11 +0200
Subject: [PATCH] Enable QML debugging
---
plasmoidviewer/CMakeLists.txt | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/plasmoidviewer/CMakeLists.txt b/plasmoidviewer/CMakeLists.txt
index d8f20ee..91848f0 100644
--- a/plasmoidviewer/CMakeLists.txt
+++ b/plasmoidviewer/CMakeLists.txt
@@ -1,3 +1,9 @@
+# allow enabling debug build specificly for plasmoidviewer
+option(PLASMOIDVIEWER_DEBUG "enables debug build for plasmoidviewer" OFF)
+if(PLASMOIDVIEWER_DEBUG)
+ set(CMAKE_BUILD_TYPE "Debug")
+endif()
+
set(plasmoidviewer_SRCS
main.cpp
view.cpp
@@ -6,6 +12,11 @@ set(plasmoidviewer_SRCS
add_executable(plasmoidviewer ${plasmoidviewer_SRCS})
target_compile_definitions(plasmoidviewer PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}")
+# enable QML debugging for debug build
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ target_compile_definitions(plasmoidviewer PRIVATE -DQT_QML_DEBUG)
+endif()
+
target_link_libraries(plasmoidviewer
Qt5::Quick
Qt5::DBus
--
2.18.0
|