Patch FindTQt.cmake to pre-define MOC_EXECUTABLE #28

Kapalı
Ray-V tarafından 5 yıl önce açıldı · 5 yorum
Ray-V 5 yıl önce yorum yaptı
Katkıcı

When cross compiling on x86 for arm/aarch64 I use qemu/binfmt to run whatever arm binaries are needed during the build.

However, tqmoc produces arch independent output and so the x86 binary can be used, avoiding the overhead that qemu produces.

It's convenient to place the x86 binaries outside the TDE tree and be able to define where tqmoc can be found, so I use this patch in FindTQt.cmake:

--- cmake/modules/FindTQt.cmake
+++ cmake/modules/FindTQt.cmake
@@ -34,0 +35 @@
+if( NOT DEFINED MOC_EXECUTABLE )
@@ -38 +39 @@
-
+endif( NOT DEFINED MOC_EXECUTABLE )

and can then use with cmake, for example:
-D MOC_EXECUTABLE=/path/to/x86/tqmoc

When cross compiling on x86 for arm/aarch64 I use qemu/binfmt to run whatever arm binaries are needed during the build. However, tqmoc produces arch independent output and so the x86 binary can be used, avoiding the overhead that qemu produces. It's convenient to place the x86 binaries outside the TDE tree and be able to define where tqmoc can be found, so I use this patch in FindTQt.cmake: ```diff --- cmake/modules/FindTQt.cmake +++ cmake/modules/FindTQt.cmake @@ -34,0 +35 @@ +if( NOT DEFINED MOC_EXECUTABLE ) @@ -38 +39 @@ - +endif( NOT DEFINED MOC_EXECUTABLE ) ``` and can then use with cmake, for example: `-D MOC_EXECUTABLE=/path/to/x86/tqmoc`
SlavekB 5 yıl önce yorum yaptı
Sahibi

Adding a condition seems like a good idea for all executables that is being searched here. This not only allows to specify paths as building parameters, but also prevents repeated searches in case of repeated building.

I added you to a team of contributors. Therefore, you can now create a pull request for your proposed patch – see TGW page on wiki.

Adding a condition seems like a good idea for all executables that is being searched here. This not only allows to specify paths as building parameters, but also prevents repeated searches in case of repeated building. I added you to a team of contributors. Therefore, you can now create a pull request for your proposed patch – see [TGW page on wiki](https://wiki.trinitydesktop.org/TDE_Gitea_Workspace).
MicheleC 5 yıl önce yorum yaptı
Sahibi

Welcome Ray 😄

Welcome Ray :smile:
Fat-Zer 5 yıl önce yorum yaptı
Katkıcı

Note that you should make the variables CACHEd rather than adding the conditions. The tde_execute_process() already has a built-in support for that — just add CACHE to it's arguments.

Note that you should make the variables `CACHE`d rather than adding the conditions. The `tde_execute_process()` already has a built-in support for that — just add `CACHE` to it's arguments.
SlavekB 5 yıl önce yorum yaptı
Sahibi

Thank you @Fat-Zer, this is a very good reminder! Such a solution will be good and very clean.

Thank you @Fat-Zer, this is a very good reminder! Such a solution will be good and very clean.
SlavekB yeni bir 5 yıl önce bağımlılığı eklendi
SlavekB 5 yıl önce yorum yaptı
Sahibi

Thank you for reporting – the issue has been resolved by #29.

Thank you for reporting – the issue has been resolved by #29.
SlavekB 5 yıl önce konusunu kapattı
SlavekB 5 yıl önce R14.0.7 release kilometre taşına ekledi
Bu konuşmaya katılmak için oturum aç.
Kilometre Taşı Yok
Atanan Kişi Yok
4 Katılımcı
Bildirimler
Bitiş Tarihi

Bitiş tarihi atanmadı.

Bağımlılıklar
Referans: TDE/tde-cmake#28
Yükleniyor…
Henüz bir içerik yok.