SET(MICE_QRC ${CMAKE_CURRENT_SOURCE_DIR}/mice.qrc)
ADD_CUSTOM_COMMAND (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qrc_mouse.cs COMMAND ${CSRCC_EXECUTABLE} -name mice ${MICE_QRC} -o qrc_mouse.cs COMMENT "Generating qrc_mouse.cs")

SET(SRC_CS ${CMAKE_CURRENT_SOURCE_DIR}/main.cs ${CMAKE_CURRENT_SOURCE_DIR}/mouse.cs ${CMAKE_CURRENT_BINARY_DIR}/qrc_mouse.cs)
CSHARP_ADD_EXECUTABLE(collidingmice "${SRC_CS}" REFERENCES qt-dotnet COMPILE_FLAGS /warn:0 UNSAFE)
ADD_DEPENDENCIES(collidingmice qt-dotnet)
