summaryrefslogtreecommitdiff
blob: a5b12aac3579b2f75bd345c3b9bb6b588f3b0aa3 (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
69
70
71
72
73
74
75
From 099fc991b85e91aa4bbfd20ba005f0c3a0002f97 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date: Wed, 31 Jan 2018 15:32:46 +0100
Subject: [PATCH] Make sure to search for Qt5-based qmlplugindump

Summary:
Without any hint, qmlplugindump version is whatever default is set by qtchooser.
Fix uses the same approach as FindQtWaylandScanner.cmake.

Test Plan: ecm_find_qmlmodule now works properly for e.g. kirigami.

Reviewers: apol

Subscribers: aacid, dfaure, cgiboudeaux, #frameworks, #build_system

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D9116
---
 modules/ECMFindQMLModule.cmake.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/ECMFindQMLModule.cmake.in b/modules/ECMFindQMLModule.cmake.in
index 428d60a..8109ab8 100644
--- a/modules/ECMFindQMLModule.cmake.in
+++ b/modules/ECMFindQMLModule.cmake.in
@@ -26,8 +26,11 @@
 #=============================================================================
 
 include(FindPackageHandleStandardArgs)
+include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake")
 
-find_program(QMLPLUGINDUMP_PROGRAM qmlplugindump)
+query_qmake(qt_binaries_dir QT_INSTALL_BINS)
+
+find_program(QMLPLUGINDUMP_PROGRAM NAMES qmlplugindump HINTS ${qt_binaries_dir})
 if(NOT QMLPLUGINDUMP_PROGRAM)
     message(WARNING "Could not find qmlplugindump. It is necessary to look up qml module dependencies.")
 endif()
-- 
2.16.1

From 3e3ac52aef1bbe22d293a05253c69b755f59428c Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date: Wed, 31 Jan 2018 15:58:10 +0100
Subject: [PATCH] FindQtWaylandScanner.cmake: Use qmake-query for HINT

Instead of hardcoded /usr/lib, same solution as in D9116
---
 find-modules/FindQtWaylandScanner.cmake | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/find-modules/FindQtWaylandScanner.cmake b/find-modules/FindQtWaylandScanner.cmake
index 79a1b05..37ebbdb 100644
--- a/find-modules/FindQtWaylandScanner.cmake
+++ b/find-modules/FindQtWaylandScanner.cmake
@@ -86,11 +86,14 @@
 #=============================================================================
 
 include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake)
+include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake")
 
 ecm_find_package_version_check(QtWaylandScanner)
 
+query_qmake(qt_binaries_dir QT_INSTALL_BINS)
+
 # Find qtwaylandscanner
-find_program(QtWaylandScanner_EXECUTABLE NAMES qtwaylandscanner HINTS /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/bin/)
+find_program(QtWaylandScanner_EXECUTABLE NAMES qtwaylandscanner HINTS ${qt_binaries_dir})
 
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(QtWaylandScanner
-- 
2.16.1