Add common tde_setup_dbus macro #22

Злито
SlavekB злито 1 комітів з feat/add-test-dbus до master 5 роки тому
SlavekB прокоментував(ла) 5 роки тому
Власник

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 додано PR/rfc з міткою 5 роки тому
MicheleC зміни затверджено 5 роки тому
MicheleC додав коментар
Власник

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

Great work, just need to fix the two points I mentioned
modules/TDEMacros.cmake Застарілі
if( NOT "${ARGV}" STREQUAL "" AND NOT DBUS_TQT_FOUND )
pkg_search_module( DBUS_TQT ${ARGV} )
if( NOT DBUS_FOUND )
MicheleC прокоментував(ла) 5 роки тому
Власник

Should be:

if( NOT DBUS_TQT_FOUND )
Should be: ``` if( NOT DBUS_TQT_FOUND ) ```
SlavekB прокоментував(ла) 5 роки тому
Автор
Власник

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.
SlavekB прокоментував(ла) 5 роки тому
Автор
Власник

Now I understand - the mistake fixed.

Now I understand - the mistake fixed.
modules/TDEMacros.cmake Застарілі
if( NOT DBUS_FOUND )
tde_message_fatal( "${ARGV} is required, but not found on your system" )
endif( )
if( "${ARGV}" STREQUAL "dbus-1-tqt" )
MicheleC прокоментував(ла) 5 роки тому
Власник

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" ) ```
SlavekB прокоментував(ла) 5 роки тому
Автор
Власник

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 зміни затверджено 5 роки тому
MicheleC додав коментар
Власник

LGTM 👍

LGTM :+1:
SlavekB видалено PR/rfc з міткою 5 роки тому
MicheleC прокоментував(ла) 5 роки тому
Власник

Related to issue #20

Related to issue #20
MicheleC додав(ла) до R14.0.6 release етапу 5 роки тому
SlavekB закрив цей запит на злиття 5 роки тому
SlavekB видалена гілка feat/add-test-dbus 5 роки тому
Запит на злиття був влитиий як ac342e63c6.
Підпишіться щоб приєднатися до обговорення.
Немає рецензентів
Етап відсутній
Немає виконавця
2 учасників
Сповіщення
Дата завершення

Термін виконання не встановлений.

Залежності

No dependencies set.

Reference: TDE/tde-cmake#22
Завантаження…
Тут ще немає жодного змісту.