Fix build without Vulkan

The syncqt generated headers are optional, i.e. their source may not
exist -- so for now make their installation optional (as it seems to
have been the case with qmake).

Change-Id: Ieaeb3d13a1d8ff1f158b5b1c918750fec48d3bef
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
This commit is contained in:
Simon Hausmann 2019-02-12 14:57:58 +01:00 committed by Kevin Funk
parent 519ef817ff
commit 1f96506748

View File

@ -340,10 +340,10 @@ function(qt_install_injections module)
set(fwd_hdrs ${injection})
get_filename_component(destinationdir ${destination} DIRECTORY)
get_filename_component(destinationname ${destination} NAME)
install(FILES ${PROJECT_BINARY_DIR}/${file} DESTINATION ${INSTALL_INCLUDEDIR}/${module}/${destinationdir} RENAME ${destinationname})
install(FILES ${PROJECT_BINARY_DIR}/${file} DESTINATION ${INSTALL_INCLUDEDIR}/${module}/${destinationdir} RENAME ${destinationname} OPTIONAL)
foreach(fwd_hdr ${fwd_hdrs})
file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${fwd_hdr}" CONTENT "#include \"${destinationname}\"\n")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${fwd_hdr}" DESTINATION ${INSTALL_INCLUDEDIR}/${module}/${destinationdir})
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${fwd_hdr}" DESTINATION ${INSTALL_INCLUDEDIR}/${module}/${destinationdir} OPTIONAL)
endforeach()
endforeach()
endfunction()