SET(UI_CHATMAINWINDOW ${CMAKE_CURRENT_SOURCE_DIR}/chatmainwindow.ui)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/chatmainwindow.cs COMMAND ${UICS_EXECUTABLE} ${UI_CHATMAINWINDOW} -o chatmainwindow.cs COMMENT "Generating chatmainwindow.cs")

SET(UI_CHATSETNICKNAME ${CMAKE_CURRENT_SOURCE_DIR}/chatsetnickname.ui)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/chatsetnickname.cs COMMAND ${UICS_EXECUTABLE} ${UI_CHATSETNICKNAME} -o chatsetnickname.cs COMMENT "Generating chatsetnickname.cs")

SET(SRC_CS_CHAT ${CMAKE_CURRENT_SOURCE_DIR}/chat_adaptor.cs  ${CMAKE_CURRENT_SOURCE_DIR}/chat.cs  ${CMAKE_CURRENT_SOURCE_DIR}/chat_interface.cs  ${CMAKE_CURRENT_BINARY_DIR}/chatmainwindow.cs  ${CMAKE_CURRENT_BINARY_DIR}/chatsetnickname.cs)
SET(CS_FLAGS -warn:0 -r:${LIBRARY_OUTPUT_PATH}/qt-dotnet.dll)
ADD_CS_EXECUTABLE(chat "${SRC_CS_CHAT}" ALL)
