blob: 1a1a0da8a6570328b3a4ecf10e00f9e2ab1a330c (
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
|
From 99a7093be6ff45199afd1c77c3c937b9b309a7ef Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Wed, 9 Dec 2020 01:28:25 +0100
Subject: [PATCH] Move Qt test dependencies into test dir
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
---
CMakeLists.txt | 8 ++++----
qt5/CMakeLists.txt | 7 +++++--
qt6/CMakeLists.txt | 6 ++++--
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 29ba72f6..d6e52941 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -218,14 +218,14 @@ endif()
find_soft_mandatory_package(ENABLE_QT5 Qt5Core ${QT5_VERSION})
find_soft_mandatory_package(ENABLE_QT5 Qt5Gui ${QT5_VERSION})
find_soft_mandatory_package(ENABLE_QT5 Qt5Xml ${QT5_VERSION})
-find_soft_mandatory_package(ENABLE_QT5 Qt5Widgets ${QT5_VERSION})
-find_soft_mandatory_package(ENABLE_QT5 Qt5Test ${QT5_VERSION})
+find_soft_mandatory_package(BUILD_QT5_TESTS Qt5Widgets ${QT5_VERSION})
+find_soft_mandatory_package(BUILD_QT5_TESTS Qt5Test ${QT5_VERSION})
SET(QT_NO_CREATE_VERSIONLESS_TARGETS ON)
find_soft_mandatory_package(ENABLE_QT6 Qt6Core ${QT6_VERSION})
find_soft_mandatory_package(ENABLE_QT6 Qt6Gui ${QT6_VERSION})
-find_soft_mandatory_package(ENABLE_QT6 Qt6Widgets ${QT6_VERSION})
-find_soft_mandatory_package(ENABLE_QT6 Qt6Test ${QT6_VERSION})
+find_soft_mandatory_package(BUILD_QT6_TESTS Qt6Widgets ${QT6_VERSION})
+find_soft_mandatory_package(BUILD_QT6_TESTS Qt6Test ${QT6_VERSION})
add_definitions(-DQT_NO_CAST_FROM_ASCII)
add_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
diff --git a/qt5/CMakeLists.txt b/qt5/CMakeLists.txt
index 431d2d35..bd4194e5 100644
--- a/qt5/CMakeLists.txt
+++ b/qt5/CMakeLists.txt
@@ -9,5 +9,8 @@ add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050E00)
add_definitions(-DQT_NO_DEPRECATED_WARNINGS)
add_subdirectory(src)
-add_subdirectory(tests)
-add_subdirectory(demos)
+
+if(BUILD_QT5_TESTS)
+ add_subdirectory(tests)
+ add_subdirectory(demos)
+endif()
diff --git a/qt6/CMakeLists.txt b/qt6/CMakeLists.txt
index 89e612d1..23b39d72 100644
--- a/qt6/CMakeLists.txt
+++ b/qt6/CMakeLists.txt
@@ -7,5 +7,7 @@ endif()
add_subdirectory(src)
-add_subdirectory(tests)
-add_subdirectory(demos)
+if(BUILD_QT6_TESTS)
+ add_subdirectory(tests)
+ add_subdirectory(demos)
+endif()
--
2.54.0
|