AUTOMOC_EXECUTABLE does not support per-config values
add_executable(moc moc.cpp)
add_executable(exe main.cpp)
set_target_properties(exe PROPERTIES
AUTOMOC ON
AUTOMOC_EXECUTABLE $<TARGET_FILE:moc>
)
This should use the per-config moc
executable, but it only evaluates once, with an empty config. The offending line is at cmQtAutoGenInitializer.cxx:1674
:
genVars.Executable = cge->Evaluate(this->LocalGen, "");
Autogen will need to be refactored to accept per-config QT_MOC_EXECUTABLE
settings.