mpyne added a comment.

  OK then, I think @kossebau is right in that this is a dependency issue in the 
`lookandfeel` part of plasma-desktop.  The `kcm_lookandfeel` target declares 
the JSON dependency (with the CMake macro) in time for CMake to care about it 
and ensure the generated build system picks up the dependency for automoc to 
run.  The `lookandfeel` command line tool target does not add the dependency on 
the JSON file and there's no other reason for CMake to know that the JSON file 
must be generated before `lookandfeel`'s AUTOMOC can complete.
  
  ie. CMake perceives this order as legal:
  
  1. AUTOMOC for `lookandfeel`
  2. moc runs on kcm.cpp
  3. JSON generation for AUTOMOC for `kcm_lookandfeel`
  4. kcm_lookandfeel.json is generated
  5. AUTOMOC for `kcm_lookandfeel`
  6. moc runs on kcm.cpp
  7. build continues
  
  2 and 6 are identical here and it seems that CMake is smart enough to only do 
this once in the whole build, but CMake only has the dependency on the JSON for 
the moc at step 6, not step 2, so CMake doesn't know that it also needs to 
delay `lookandfeel`'s AUTOMOC phase until after JSON generation.
  
  That all said, if D10607 <https://phabricator.kde.org/D10607> works (and that 
diff is precisely how I'd suggest handling the issue), then I think we can then 
abandon this revision.  Let me know if you disagree.

REPOSITORY
  R244 KCoreAddons

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

To: tcberner, #freebsd, mpyne, bshah, dfaure, rakuco
Cc: bcooksley, rikmills, rakuco, kfunk, adridg, kossebau, #frameworks, michaelh

Reply via email to