<table><tr><td style="">rjvbb added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D6001" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D6001#112487" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D6001#112487</a>, <a href="https://phabricator.kde.org/p/elvisangelaccio/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@elvisangelaccio</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>Is <tt style="background: #ebebeb; font-size: 13px;">otool</tt> even available on linux? If a mac user also has <tt style="background: #ebebeb; font-size: 13px;">ldd</tt> that wouldn't be a problem, as long as we put the <tt style="background: #ebebeb; font-size: 13px;">findExecutable(ldd)</tt> in the else branch (so if <tt style="background: #ebebeb; font-size: 13px;">otool</tt> is found, we use it).</p></div>
</blockquote>
<p>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.</p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Anyway, if you *really* want to make this a compile-time check, then I'd prefer to use cmake magic, something like:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">if (APPLE)
target_compile_definitions(kerfuffle -DDEPENDENCY_TOOL=otool)
target_compile_definitions(kerfuffle -DDEPENDENCY_TOOL_ARGS=-L)
else()
# define as ldd...
endif()</pre></div></blockquote>
<p>I personally think that'd be preferable over runtime checking but it's your call.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R36 Ark</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6001" rel="noreferrer">https://phabricator.kde.org/D6001</a></div></div><br /><div><strong>To: </strong>rjvbb, Ark, elvisangelaccio<br /><strong>Cc: </strong>elvisangelaccio, kde-utils-devel, tctara<br /></div>