D23233: Fix CI failure on the KDE build server

Karthik Periagaram <[email protected]>
Newsgroups gmane.comp.kde.devel.games
Message-ID <[email protected]>
karthikp added a comment.


  I wasn't aware of another revision being under review to fix the same issue, sorry.
  
  D23219 <https://phabricator.kde.org/D23219> 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.
  
  If the cmake module is going to be reused, however, D23219 <https://phabricator.kde.org/D23219> 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 `STRING(REPLACE ...)` fix like in this revision, and against the latter by checking with `IF (TARGET ...)` and adding an incrementing numeric suffix to the target name, as needed. The current patch can be reused in other projects as is.
  
  If reuse is not a concern, I think I'd go with the simpler fix (D23219 <https://phabricator.kde.org/D23219>), to be honest.

REPOSITORY
  R387 Kajongg

REVISION DETAIL
  https://phabricator.kde.org/D23233

To: karthikp, bcooksley, #kde_games
Cc: ltoscano, kde-games-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.