AUTOUIC generated header files (ui_xxxx.h) not automatically added to include directories
When using Cmake v3.10 rc5 with Visual Studio and Qt 5.6.3, autouic correctly generates the ui_xxxx.h file in the AUTOGEN_BUILD_DIR as documented here: https://cmake.org/cmake/help/v3.10/prop_tgt/AUTOUIC.html.
However, it is not "automatically added to the target’s INCLUDE_DIRECTORIES" as suggested in the documentation and instead the file needs to be copied over to the sources in order for compilation to work.
Currently to make this work in my project I am using the following commands:
SET(AUTOGEN_BUILD_DIR "${CMAKE_BUILD_DIR}/<project>_autogen/include_${CONFIG}")
file(COPY "${AUTOGEN_BUILD_DIR}/ui_xxxx.h" DESTINATION "${CMAKE_SOURCE_DIR}/headers")