Exclude generated files from being processed by Qt's tools

This should suppress warning about CMP0071.
This commit is contained in:
Martchus 2021-09-22 11:16:40 +02:00
parent 2cd6c54100
commit c0c8efaf13
1 changed files with 7 additions and 0 deletions

View File

@ -74,6 +74,13 @@ add_custom_command(
DEPENDS "${FORK_AWESOME_ICON_DEFINITIONS}"
COMMENT "Icon header")
# exclude generated files from being processed by Qt's tools (see CMP0071)
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.8")
foreach (GENERATED_FILE ${ID_MAPPING_HEADER_FILE} ${ICONS_HEADER_FILE})
set_property(SOURCE "${GENERATED_FILE}" PROPERTY SKIP_AUTOGEN ON)
endforeach ()
endif ()
# use headers and CMake modules from c++utilities and qtutilities
use_cpp_utilities(ONLY_HEADERS VISIBILITY PUBLIC)
use_qt_utilities(ONLY_HEADERS VISIBILITY PRIVATE)