FIND_PACKAGE(Qt4 REQUIRED)

MESSAGE (STATUS "Use file: ${QT_USE_FILE}")

SET(QT_USE_QTXML 1)

include(UseQt4)

include_directories(${QT_INCLUDE_DIR})
include_directories(${QT_QT_INCLUDE_DIR})
include_directories(${QT_QTCORE_INCLUDE_DIR})
include_directories(${QT_QTGUI_INCLUDE_DIR})
include_directories(${QT_QTXML_INCLUDE_DIR})
#include_directories(${QT_QTSVG_INCLUDE_DIR})

#QT4_WRAP_UI(ui_design_main_window.h design_main_window.ui)


#QT4_WRAP_CPP(moc_gnuplot_connection gnuplot_connection.h)
QT4_WRAP_CPP(moc_parser parser.h)
QT4_WRAP_CPP(moc_reader reader.h)
QT4_WRAP_CPP(moc_stdin_reader stdin_reader.h)
QT4_WRAP_CPP(moc_button widgets/button.h)
QT4_WRAP_CPP(moc_combobox widgets/combobox.h)
QT4_WRAP_CPP(moc_hbox widgets/hbox.h)
QT4_WRAP_CPP(moc_hseparator widgets/hseparator.h)
QT4_WRAP_CPP(moc_label widgets/label.h)
QT4_WRAP_CPP(moc_lineedit widgets/lineedit.h)
QT4_WRAP_CPP(moc_menu widgets/menu.h)
QT4_WRAP_CPP(moc_scroll widgets/scroll.h)
QT4_WRAP_CPP(moc_selectfile widgets/selectfile.h)
QT4_WRAP_CPP(moc_textedit widgets/textedit.h)
QT4_WRAP_CPP(moc_tree widgets/tree.h)
QT4_WRAP_CPP(moc_vbox widgets/vbox.h)
QT4_WRAP_CPP(moc_vseparator widgets/vseparator.h)
QT4_WRAP_CPP(moc_window widgets/window.h)


add_executable(xmlwidget 
	output.h
	parser.h
	moc_parser.cxx
	reader.h
	moc_reader.cxx
	stdin_reader.h
	moc_stdin_reader.cxx
	widgets/button.h
	moc_button.cxx
	widgets/combobox.h
	moc_combobox.cxx
	widgets/hbox.h
	moc_hbox.cxx
	widgets/hseparator.h
	moc_hseparator.cxx
	widgets/label.h
	moc_label.cxx
	widgets/lineedit.h
	moc_lineedit.cxx
	widgets/menu.h
	moc_menu.cxx
	widgets/scroll.h
	moc_scroll.cxx
	widgets/selectfile.h
	moc_selectfile.cxx
	widgets/textedit.h
	moc_textedit.cxx
	widgets/tree.h
	moc_tree.cxx
	widgets/vbox.h
	moc_vbox.cxx
	widgets/vseparator.h
	moc_vseparator.cxx
	widgets/widget.h
	widgets/widgets.h
	widgets/window.h
	moc_window.cxx
	xmlhandler.h
	main.cpp
	output.cpp
	parser.cpp
	reader.cpp
	stdin_reader.cpp
	widgets/button.cpp
	widgets/combobox.cpp
	widgets/hbox.cpp
	widgets/hseparator.cpp
	widgets/label.cpp
	widgets/lineedit.cpp
	widgets/menu.cpp
	widgets/scroll.cpp
	widgets/selectfile.cpp
	widgets/textedit.cpp
	widgets/tree.cpp
	widgets/vbox.cpp
	widgets/vseparator.cpp
	widgets/widget.cpp
	widgets/widgets.cpp
	widgets/window.cpp
	xmlhandler.cpp

)

TARGET_LINK_LIBRARIES(xmlwidget ${Qt4_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY})

install	(
		PROGRAMS xmlwidget
		DESTINATION bin
	)
