Add common tde_setup_dbus macro #22

Fusionnée
SlavekB a fusionné 1 révision(s) à partir de feat/add-test-dbus vers master il y a 5 ans
Propriétaire

The macro is primarily used for modules that create some D-Bus services.

It can be called without a parameter – only dbus-1 will be tested and the paths to the dbus files will be searched. Alternatively, the name of the TQt dbus module – usually dbus-1-tqt – can be entered as a parameter. If the parameter is entered, the TQt dbus module will also be tested.

Note: Macro in this form can also be used for the R14.0.x branch.

The macro is primarily used for modules that create some D-Bus services. It can be called without a parameter – only dbus-1 will be tested and the paths to the dbus files will be searched. Alternatively, the name of the TQt dbus module – usually dbus-1-tqt – can be entered as a parameter. If the parameter is entered, the TQt dbus module will also be tested. Note: Macro in this form can also be used for the R14.0.x branch.
SlavekB a ajouté l'étiquette PR/rfc il y a 5 ans
MicheleC ces changements ont été approuvés il y a 5 ans
MicheleC laisser un commentaire
Propriétaire

Great work, just need to fix the two points I mentioned

Great work, just need to fix the two points I mentioned
if( NOT "${ARGV}" STREQUAL "" AND NOT DBUS_TQT_FOUND )
pkg_search_module( DBUS_TQT ${ARGV} )
if( NOT DBUS_FOUND )
Propriétaire

Should be:

if( NOT DBUS_TQT_FOUND )
Should be: ``` if( NOT DBUS_TQT_FOUND ) ```
Éditeur
Propriétaire

The macro is ready to allow two ways to call:

  1. without argument:
tde_setup_dbus( )
  1. with argument:
tde_setup_dbus( dbus-1-tqt )

Therefore, there is a condition if the argument was or was not entered.

The macro is ready to allow two ways to call: 1. without argument: ``` tde_setup_dbus( ) ``` 2. with argument: ``` tde_setup_dbus( dbus-1-tqt ) ``` Therefore, there is a condition if the argument was or was not entered.
Éditeur
Propriétaire

Now I understand - the mistake fixed.

Now I understand - the mistake fixed.
if( NOT DBUS_FOUND )
tde_message_fatal( "${ARGV} is required, but not found on your system" )
endif( )
if( "${ARGV}" STREQUAL "dbus-1-tqt" )
Propriétaire

Only check if dbus-1-tqt was found

if( DBUS_TQT_FOUND AND "${ARGV}" STREQUAL "dbus-1-tqt" )
Only check if dbus-1-tqt was found ``` if( DBUS_TQT_FOUND AND "${ARGV}" STREQUAL "dbus-1-tqt" ) ```
Éditeur
Propriétaire

Here are two independent conditions. If an argument was entered, but the requested module was not found then here is tde_message_fatal.

A separate condition is if the required module was dbus-1-tqt, then the path to the binary will be searched.

Therefore, it seems to me appropriate not to mix these conditions into one.

Here are two independent conditions. If an argument was entered, but the requested module was not found then here is `tde_message_fatal`. A separate condition is if the required module was dbus-1-tqt, then the path to the binary will be searched. Therefore, it seems to me appropriate not to mix these conditions into one.
MicheleC ces changements ont été approuvés il y a 5 ans
MicheleC laisser un commentaire
Propriétaire

LGTM 👍

LGTM :+1:
SlavekB a supprimé l'étiquette PR/rfc il y a 5 ans
Propriétaire

Related to issue #20

Related to issue #20
MicheleC a ajouté cela au jalon R14.0.6 release il y a 5 ans
SlavekB a fermé cette pull request il y a 5 ans
SlavekB a supprimé la branche feat/add-test-dbus il y a 5 ans
La demande d'ajout a été fusionnée en ac342e63c6.
Connectez-vous pour rejoindre cette conversation.
Aucune évaluation
Aucun jalon
Pas d'assignataires
2 participants
Notifications
Échéance

Aucune échéance n'a été définie.

Dépendances

No dependencies set.

Reference: TDE/tde-cmake#22
Chargement…
Il n'existe pas encore de contenu.