Can we make the automoc4 executable finding smarter? It is not actually an Arch issue, but at least certain Arch and KDE contributors would be potentially happier.<br><br>Thank you for your help ! A long issue has just moved forward! :)<br>
<br><div class="gmail_quote">On Sat, Nov 17, 2012 at 7:31 PM, Alexander Neundorf <span dir="ltr"><<a href="mailto:neundorf@kde.org" target="_blank">neundorf@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Saturday 17 November 2012, Laszlo Papp wrote:<br>
</div><div><div class="h5">> It seems the issue is that "/bin" is before in my PATH than "/usr/bin".<br>
> Once the order swapper, it works fine.<br>
><br>
> I believe, cmake should be smarter without depending on path order. If<br>
> cmake does not find anything in /bin, it should look for the next entry in<br>
> the PATH environment variable. Currently, this is not happening for unknown<br>
> reason for me. Hard coding "/usr/bin" before "/bin" may cause failure for<br>
> other projects.<br>
><br>
> Perhaps, the issue is coming from here?<br>
> get_filename_component(_AUTOMOC4_CURRENT_DIR  "${CMAKE_CURRENT_LIST_FILE}"<br>
> PATH)<br>
<br>
</div></div>Well, it is related.<br>
<br>
The automoc executable is searched using this call:<br>
<div class="im">find_program(AUTOMOC4_EXECUTABLE automoc4 PATHS  "${_AUTOMOC4_BIN_DIR}/bin"<br>
             NO_DEFAULT_PATH)<br>
<br>
</div>Due to the NO_DEFAULT_PATH this should search only in the directories listed,<br>
i.e. only in "${_AUTOMOC4_BIN_DIR}/bin", which is "/bin" in your case, but<br>
should be "/usr/lib/bin/".<br>
<br>
If automoc would be installed with CMAKE_INSTALL_PREFIX=/, it would work.<br>
It works also if CMAKE_INSTALL_PREFIX=/usr/, but then it fails (e.g. for you)<br>
if /lib/ points into the /usr/ tree.<br>
<br>
Alex<br>
</blockquote></div><br>