D6001: Ark: kerfuffle plugin Mac adaptation
René J.V. Bertin
noreply at phabricator.kde.org
Mon May 29 12:17:20 UTC 2017
rjvbb added a comment.
In https://phabricator.kde.org/D6001#112487, @elvisangelaccio wrote:
> Is `otool` even available on linux? If a mac user also has `ldd` that wouldn't be a problem, as long as we put the `findExecutable(ldd)` in the else branch (so if `otool` is found, we use it).
I was indeed thinking of testing for otool and then falling back to ldd. However, 'otool' is really a rather vague name (it serves a whole set of related purposes on Mac). It doesn't exist as such on Linux, nor do I know of any existing tool with the name, but that's also exactly why anyone could write a script for whatever (unrelated) purposes. However unlikely that may sound, it's a possibility. I don't care personally, and I don't think it'll affect anyone who uses both platforms so if you don't care I'll just put in the runtime checks.
> Anyway, if you *really* want to make this a compile-time check, then I'd prefer to use cmake magic, something like:
>
> if (APPLE)
> target_compile_definitions(kerfuffle -DDEPENDENCY_TOOL=otool)
> target_compile_definitions(kerfuffle -DDEPENDENCY_TOOL_ARGS=-L)
> else()
> # define as ldd...
> endif()
I personally think that'd be preferable over runtime checking but it's your call.
REPOSITORY
R36 Ark
REVISION DETAIL
https://phabricator.kde.org/D6001
To: rjvbb, #ark, elvisangelaccio
Cc: elvisangelaccio, kde-utils-devel, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20170529/bfe0227c/attachment.html>
More information about the Kde-utils-devel
mailing list