<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/D23219">View Revision</a></tr></table><br /><div><div><p>It might be a good idea to harden this fix further:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">The file name could potentially have spaces in it. So, a simple (<tt style="background: #ebebeb; font-size: 13px;">string(REPLACE ...)</tt>) for spaces with underscores should fix that (see <a href="https://phabricator.kde.org/D23233" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D23233</a>).</li>
<li class="remarkup-list-item">Instead of using the full path, we could use the path relative to the current source directory (<tt style="background: #ebebeb; font-size: 13px;">file(RELATIVE_PATH ...)</tt>)  to get a unique target name. Another option would be to check (<tt style="background: #ebebeb; font-size: 13px;">if(TARGET ...)</tt>) and add a numeric suffix as needed. Both would handle the case where the project has the same filename in two different paths. This will still fix bug 376303 by creating shorter target names.</li>
</ol></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/D23219">https://phabricator.kde.org/D23219</a></div></div><br /><div><strong>To: </strong>jjazeix, KDE Games<br /><strong>Cc: </strong>karthikp, kde-games-devel<br /></div>