<table><tr><td style="">karthikp 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/D23233">View Revision</a></tr></table><br /><div><div><p>I wasn't aware of another revision being under review to fix the same issue, sorry.</p>

<p><a href="https://phabricator.kde.org/D23219" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D23219</a> is the simpler fix, using only the file name to create a target name. Unless this cmake module could be reused in other projects, that fix is sufficient to address this broken build issue.</p>

<p>If the cmake module is going to be reused, however, <a href="https://phabricator.kde.org/D23219" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D23219</a> needs to be hardened further to address two potential breakages: if the file name has spaces in it, or if there are multiple files in the same repository that share the same name. We could guard against the first by using a <tt style="background: #ebebeb; font-size: 13px;">STRING(REPLACE ...)</tt> fix like in this revision, and against the latter by checking with <tt style="background: #ebebeb; font-size: 13px;">IF (TARGET ...)</tt> and adding an incrementing numeric suffix to the target name, as needed. The current patch can be reused in other projects as is.</p>

<p>If reuse is not a concern, I think I'd go with the simpler fix (<a href="https://phabricator.kde.org/D23219" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D23219</a>), to be honest.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R387 Kajongg</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23233">https://phabricator.kde.org/D23233</a></div></div><br /><div><strong>To: </strong>karthikp, bcooksley, KDE Games<br /><strong>Cc: </strong>ltoscano, kde-games-devel<br /></div>