Add common tde_setup_dbus macro #22

已合併
SlavekB 5 年之前 將 1 次代碼提交從 feat/add-test-dbus 合併至 master
所有者

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 added the PR/rfc label 5 年之前
MicheleC approved these changes 5 年之前
MicheleC left a comment
所有者

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 )
所有者

Should be:

if( NOT DBUS_TQT_FOUND )
Should be: ``` if( NOT DBUS_TQT_FOUND ) ```
發佈者
所有者

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.
發佈者
所有者

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" )
所有者

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" ) ```
發佈者
所有者

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 approved these changes 5 年之前
MicheleC left a comment
所有者

LGTM 👍

LGTM :+1:
SlavekB removed the PR/rfc label 5 年之前
所有者

Related to issue #20

Related to issue #20
MicheleC 新增至R14.0.6 release 里程碑 5 年之前
SlavekB closed this pull request 5 年之前
SlavekB 刪除分支 feat/add-test-dbus 5 年之前
The pull request has been merged as ac342e63c6.
登入 才能加入這對話。
No reviewers
未選擇里程碑
No Assignees
2 參與者
訊息
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tde-cmake#22
Loading…
尚未有任何內容