blob: dd76b0e95c55864820b16afffb1bb26b56780322 (
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
|
From 088d99da187031729ffe4be21b02902726181eae Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 25 Sep 2016 21:44:42 +0200
Subject: [PATCH 1/2] Fix linguist macro
- Prevent CMake appending extra 'Qt5::lupdate'/'Qt5::lrelease' to
command line when invoking lupdate/lrelease
- Achieved by resolveing the IMPORTED_LOCATION manually
Change-Id: Ie502d6237f0fed14f377912463f394c8d6ae396d
---
src/linguist/Qt5LinguistToolsMacros.cmake | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/linguist/Qt5LinguistToolsMacros.cmake b/src/linguist/Qt5LinguistToolsMacros.cmake
index dbccdbaaa..15037be68 100644
--- a/src/linguist/Qt5LinguistToolsMacros.cmake
+++ b/src/linguist/Qt5LinguistToolsMacros.cmake
@@ -104,8 +104,9 @@ function(QT5_CREATE_TRANSLATION _qm_files)
if(NOT EXISTS "${full_stamp_file_dir}")
file(MAKE_DIRECTORY "${full_stamp_file_dir}")
endif()
+ get_target_property(LUPDATE_LOC ${Qt5_LUPDATE_EXECUTABLE} IMPORTED_LOCATION)
add_custom_command(OUTPUT ${stamp_file}
- COMMAND ${Qt5_LUPDATE_EXECUTABLE}
+ COMMAND ${LUPDATE_LOC}
ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file}
COMMAND ${CMAKE_COMMAND} -E touch "${stamp_file}"
DEPENDS ${_dependencies}
@@ -155,9 +156,9 @@ function(QT5_ADD_TRANSLATION _qm_files)
else()
set(qm_dep "${_abs_FILE}")
endif()
-
+ get_target_property(LRELEASE_LOC ${Qt5_LRELEASE_EXECUTABLE} IMPORTED_LOCATION)
add_custom_command(OUTPUT ${qm}
- COMMAND ${Qt5_LRELEASE_EXECUTABLE}
+ COMMAND ${LRELEASE_LOC}
ARGS ${_LRELEASE_OPTIONS} ${_abs_FILE} -qm ${qm}
DEPENDS ${qm_dep} VERBATIM
)
--
2.47.0
|