2022-01-02 13:29:53 +01:00
|
|
|
From 0e17318db9342d7a21c224cccbccec6185208291 Mon Sep 17 00:00:00 2001
|
2017-04-19 18:09:52 +02:00
|
|
|
From: Martchus <martchus@gmx.net>
|
|
|
|
Date: Sun, 4 Dec 2016 20:35:47 +0100
|
2021-08-26 21:24:07 +02:00
|
|
|
Subject: [PATCH 24/32] Fix macro invoking moc, rcc and uic
|
2017-04-19 18:09:52 +02:00
|
|
|
|
|
|
|
* Otherwise the arguments aren't passed correctly leading to errors like
|
|
|
|
```
|
|
|
|
[ 3%] Generating qca_core.moc
|
|
|
|
moc: Too many input files specified: 'Qt5::moc' '/build/qca-qt5/src/qca-2.1.3/include/QtCrypto/qca_safetimer.h'
|
|
|
|
```
|
|
|
|
* Just a workaround, not sure what is causing the issue (maybe a CMake bug?)
|
|
|
|
* See https://github.com/Martchus/PKGBUILDs/issues/11
|
|
|
|
|
|
|
|
Change-Id: I6fde86d0a3ade37b4376604a1eb6d5723eda8b4c
|
|
|
|
---
|
|
|
|
src/corelib/Qt5CoreMacros.cmake | 9 ++++++---
|
|
|
|
src/widgets/Qt5WidgetsMacros.cmake | 3 ++-
|
|
|
|
2 files changed, 8 insertions(+), 4 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
|
2020-09-10 21:17:46 +02:00
|
|
|
index f5766f8775..2403717802 100644
|
2017-04-19 18:09:52 +02:00
|
|
|
--- a/src/corelib/Qt5CoreMacros.cmake
|
|
|
|
+++ b/src/corelib/Qt5CoreMacros.cmake
|
2020-05-29 17:30:23 +02:00
|
|
|
@@ -153,8 +153,9 @@ function(qt5_create_moc_command infile outfile moc_flags moc_options moc_target
|
2017-04-19 18:09:52 +02:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set(_moc_extra_parameters_file @${_moc_parameters_file})
|
|
|
|
+ get_target_property(MOC_LOC ${Qt5Core_MOC_EXECUTABLE} IMPORTED_LOCATION)
|
|
|
|
add_custom_command(OUTPUT ${outfile}
|
|
|
|
- COMMAND ${Qt5Core_MOC_EXECUTABLE} ${_moc_extra_parameters_file}
|
|
|
|
+ COMMAND ${MOC_LOC} ${_moc_extra_parameters_file}
|
|
|
|
DEPENDS ${infile} ${moc_depends}
|
|
|
|
${_moc_working_dir}
|
|
|
|
VERBATIM)
|
2020-05-29 17:30:23 +02:00
|
|
|
@@ -295,8 +296,9 @@ function(qt5_add_binary_resources target)
|
2017-04-19 18:09:52 +02:00
|
|
|
set(rc_depends ${rc_depends} ${_rc_depends})
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
+ get_target_property(RCC_LOC ${Qt5Core_RCC_EXECUTABLE} IMPORTED_LOCATION)
|
|
|
|
add_custom_command(OUTPUT ${rcc_destination}
|
|
|
|
- COMMAND ${Qt5Core_RCC_EXECUTABLE}
|
|
|
|
+ COMMAND ${RCC_LOC}
|
|
|
|
ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles}
|
2018-02-15 00:14:36 +01:00
|
|
|
DEPENDS ${rc_depends} ${out_depends} ${infiles} VERBATIM)
|
|
|
|
add_custom_target(${target} ALL DEPENDS ${rcc_destination})
|
2020-05-29 17:30:23 +02:00
|
|
|
@@ -339,8 +341,9 @@ function(qt5_add_resources outfiles)
|
|
|
|
_qt5_parse_qrc_file(${infile} _out_depends _rc_depends)
|
2018-02-15 00:14:36 +01:00
|
|
|
set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON)
|
2017-04-19 18:09:52 +02:00
|
|
|
|
|
|
|
+ get_target_property(MOC_LOC ${Qt5Core_RCC_EXECUTABLE} IMPORTED_LOCATION)
|
|
|
|
add_custom_command(OUTPUT ${outfile}
|
|
|
|
- COMMAND ${Qt5Core_RCC_EXECUTABLE}
|
|
|
|
+ COMMAND ${MOC_LOC}
|
|
|
|
ARGS ${rcc_options} --name ${outfilename} --output ${outfile} ${infile}
|
|
|
|
MAIN_DEPENDENCY ${infile}
|
2018-12-08 22:06:32 +01:00
|
|
|
DEPENDS ${_rc_depends} "${_out_depends}" VERBATIM)
|
2017-04-19 18:09:52 +02:00
|
|
|
diff --git a/src/widgets/Qt5WidgetsMacros.cmake b/src/widgets/Qt5WidgetsMacros.cmake
|
2020-05-29 17:30:23 +02:00
|
|
|
index 35d2a2dc54..99f061f1b8 100644
|
2017-04-19 18:09:52 +02:00
|
|
|
--- a/src/widgets/Qt5WidgetsMacros.cmake
|
|
|
|
+++ b/src/widgets/Qt5WidgetsMacros.cmake
|
2020-05-29 17:30:23 +02:00
|
|
|
@@ -55,8 +55,9 @@ function(qt5_wrap_ui outfiles )
|
2017-04-19 18:09:52 +02:00
|
|
|
get_filename_component(outfile ${it} NAME_WE)
|
|
|
|
get_filename_component(infile ${it} ABSOLUTE)
|
|
|
|
set(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
|
|
|
|
+ get_target_property(UIC_LOC ${Qt5Widgets_UIC_EXECUTABLE} IMPORTED_LOCATION)
|
|
|
|
add_custom_command(OUTPUT ${outfile}
|
|
|
|
- COMMAND ${Qt5Widgets_UIC_EXECUTABLE}
|
|
|
|
+ COMMAND ${UIC_LOC}
|
|
|
|
ARGS ${ui_options} -o ${outfile} ${infile}
|
|
|
|
MAIN_DEPENDENCY ${infile} VERBATIM)
|
2018-02-15 00:14:36 +01:00
|
|
|
set_source_files_properties(${infile} PROPERTIES SKIP_AUTOUIC ON)
|
2017-04-19 18:09:52 +02:00
|
|
|
--
|
2022-01-02 13:29:53 +01:00
|
|
|
2.34.1
|
2017-04-19 18:09:52 +02:00
|
|
|
|