Respect -DDBUS_BINDING_TOOL provided by cmake user #7
Merged
MicheleC
merged 1 commits from fiat/respect-tool
into master
5 months ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'fiat/respect-tool'
Deleting a branch is permanent. It CANNOT be undone. Continue?
A user might want to specify full path to
dbus-binding-tool
. We should respect that.This might be useful in case of cross-compiling.
if( "${DBUS_BINDING_TOOL}" STREQUAL "DBUS_BINDING_TOOL-NOTFOUND" )
Shouldn't we test that
DBUS_BINDING_TOOL
is empty before we try to detect it? If a user passes a custom path using-DDBUS_BINDING_TOOL=...
, then there should be no need to look for the program. Perhap we could add a check that the file actually exists in that case. What do you think?Nah...
find_program()
usesCACHE
variables by default it won't look for the program if the variable already defined...This solution doesn't work at all. In any case, dbus-binding-tool is used. If the variable is set, then the check simply passes, but the
dbus-binding-tool
command is used. This command can be renamed, but it cannot be assigned, sincedbus-binding-tool
will still be used. You will get the following error output:@ormorph, I believe you are doing something wrong: either using a branch without the patch or supplying some bogus arguments to cmake... Could you add the full
build.log
and your exact actions (and may beenvironment
)?Yes, there is such a thing, I got carried away, at first I did everything right:
Then I got carried away and did this:
In principle it works, you just need to check all the options.
There is one drawback here: if the
-DDBUS_BINDING_TOOL
parameter is specified, then the check for the presence of the file does not pass. Only an error during build reports a problem.Not much of a drawback per se: any bogus value before the patch would result in pretty much the same behavior:
dbus-binding-tool
would be called wihout any checks as you could notice...We neither check in tdebase if
DBUSXML2QT3_EXECUTABLE
from dbus-1-tqt is correct ... IMHO Those variables are quite niche and the tools are not as significant as e.g. compilers to justify hassling with such checks...To be honest, I don’t really understand the convenience of this. If I need to change the path and program, then I will do it by correcting the config. For the average user, the
-DDBUS_BINDING_TOOL
parameter does not say anything, nor how to use it, since it is not visible inCMakeLists.txt
.Looks good
da111a6195
into master 5 months agoThanks Alex!
Reviewers
da111a6195
.