<table><tr><td style="">dfaure requested changes to this revision.<br />dfaure added a comment.<br />This revision now requires changes to proceed.
</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/D21695">View Revision</a></tr></table><br /><div><div><p>Certainly a good idea to have this in ECM, so that this mess can be sorted out once and for all...</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21695#inline-122106">View Inline</a><span style="color: #4b4d51; font-weight: bold;">FindTaglib.cmake:56</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d"># The minimum version of Taglib we require</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #304a96">if</span><span class="p">(</span><span style="color: #766510">NOT</span> <span style="color: #766510">Taglib_FIND_VERSION</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #304a96">set</span><span class="p">(</span><span style="color: #766510">TAGLIB_FIND_VERSION</span> <span style="color: #766510">"1.4"</span><span class="p">)</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Here it says Taglib camelcase...</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21695#inline-122107">View Inline</a><span style="color: #4b4d51; font-weight: bold;">FindTaglib.cmake:57</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #304a96">if</span><span class="p">(</span><span style="color: #766510">NOT</span> <span style="color: #766510">Taglib_FIND_VERSION</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #304a96">set</span><span class="p">(</span><span style="color: #766510">TAGLIB_FIND_VERSION</span> <span style="color: #766510">"1.4"</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #304a96">endif</span><span class="p">()</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">And here it says TAGLIB uppercase. This can't be right, one of those needs to be adjusted.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21695#inline-122108">View Inline</a><span style="color: #4b4d51; font-weight: bold;">FindTaglib.cmake:80</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #304a96">set</span><span class="p">(</span><span style="color: #766510">Taglib_CFLAGS</span> <span style="color: #aa2211">${</span><span style="color: #001294">TC_Taglib_CFLAGS</span><span style="color: #aa2211">}</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #304a96">string</span><span class="p">(</span><span style="color: #766510">REGEX</span> <span style="color: #766510">REPLACE</span> <span style="color: #766510">" *-I"</span> <span style="color: #766510">";"</span> <span style="color: #766510">Taglib_INCLUDE_DIRS</span> <span style="color: #766510">"${Taglib_CFLAGS}"</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #304a96">endif</span><span class="p">()</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">This will set the include dir to <PREFIX/include/taglib....</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21695#inline-122112">View Inline</a><span style="color: #4b4d51; font-weight: bold;">FindTaglib.cmake:84</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #304a96">find_path</span><span class="p">(</span><span style="color: #766510">Taglib_INCLUDE_DIRS</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #766510">NAMES</span> <span style="color: #766510">tag.h</span> <span style="color: #766510">taglib/tag.h</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #766510">HINTS</span> <span style="color: #aa2211">${</span><span style="color: #001294">TC_Taglib_INCLUDE_DIRS</span><span style="color: #aa2211">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">(.... this searches for it both ways, so it's unclear what the include dir will be --- with or without taglib at the end?)</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21695#inline-122110">View Inline</a><span style="color: #4b4d51; font-weight: bold;">FindTaglib.cmake:94</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #304a96">if</span> <span class="p">(</span><span style="color: #766510">Taglib_INCLUDE_DIRS</span> <span style="color: #766510">AND</span> <span style="color: #766510">NOT</span> <span style="color: #766510">Taglib_VERSION</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #304a96">if</span><span class="p">(</span><span style="color: #766510">EXISTS</span> <span style="color: #766510">"Taglib_INCLUDE_DIRS}/taglib/taglib.h"</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #304a96">file</span><span class="p">(</span><span style="color: #766510">READ</span> <span style="color: #766510">"${Taglib_INCLUDE_DIRS}/taglib/taglib.h"</span> <span style="color: #766510">TAGLIB_H</span><span class="p">)</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">... and this then adds another /taglib/ to the path.</p>

<p style="padding: 0; margin: 8px;">I've always had that problem with taglib. It's not clear to me if the C/C++ code should use #include <tag.h> or #include <taglib/tag.h> and therefore it's not clear whether the include path should contain the /taglib subdir or not.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21695#inline-122113">View Inline</a><span style="color: #4b4d51; font-weight: bold;">FindTaglib.cmake:129</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #766510">IMPORTED_LOCATION</span> <span style="color: #766510">"${Taglib_LIBRARIES}"</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #766510">INTERFACE_COMPILE_OPTIONS</span> <span style="color: #766510">"${Taglib_CFLAGS}"</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #766510">INTERFACE_INCLUDE_DIRECTORIES</span> <span style="color: #766510">"${Taglib_INCLUDE_DIRS}"</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Why set both the CFLAGS and the include dir? That means having the -I twice in there.</p>

<p style="padding: 0; margin: 8px;">Line 80 assumes that the cflags will never contain other flags than -I.<br />
If that's true, then using CFLAGS here is redundant.</p>

<p style="padding: 0; margin: 8px;">If it's not true, then line 80 is wrong...</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R240 Extra CMake Modules</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D21695">https://phabricator.kde.org/D21695</a></div></div><br /><div><strong>To: </strong>heikobecker, kde-buildsystem, kde-frameworks-devel, dfaure<br /><strong>Cc: </strong>dfaure, LeGast00n, bencreasy, michaelh, ngraham, bruns<br /></div>