INCLUDE_DIRECTORIES(
	${Profdist_SOURCE_DIR}
	${Profdist_SOURCE_DIR}/src/lib
	${QT_INCLUDE_DIR}
	${Boost_INCLUDE_DIRS}
	${CMAKE_CURRENT_BINARY_DIR}
)

LINK_DIRECTORIES(
	${Profdist_BINARY_DIR}/src/lib
	${QT_LIBRARY_DIR}
	${Boost_LIBRARY_DIRS}
)

SET(profdist_qt_gui_HEADER
	alignment_data.hpp
	bootstrap_data.hpp
	bootstrap_file_reader.hpp
	bootstrap_operation.hpp
	classification_data.hpp
	consensus_data.hpp
	consensus_operation.hpp
	data_item.hpp
	data_type.hpp
	debug.hpp
	distance_data.hpp
	distance_operation.hpp
	feature.hpp
	file_type.hpp
	gui_handle.hpp
	helper.hpp
	neighbour_joining_data.hpp
	neighbour_joining_operation.hpp
	operation_accessors.hpp
	operation_interface.hpp
	profile_neighbour_joining_data.hpp
	profile_neighbour_joining_operation.hpp
	runtime_settings.hpp
	tree_item.hpp
	tree_item.Tpp
	viewer.hpp
)

SET(profdist_qt_gui_MOC_HEADER
	distance_dialog.hpp
	main_window.hpp
	profile_selection_dialog.hpp
	settings_dialog.hpp
	task.hpp
	task_container_widget.hpp
	task_manager.hpp
	tree_selection_dialog.hpp
	workspace.hpp
	workspace_tree_model.hpp
	workspace_tree_view.hpp
)

SET(profdist_qt_gui_SOURCES
	alignment_data.cpp
	bootstrap_data.cpp
	bootstrap_file_reader.cpp
	classification_data.cpp
	consensus_data.cpp
	consensus_operation.cpp
	data_item.cpp
	distance_data.cpp
	distance_dialog.cpp
	distance_operation.cpp
	feature.cpp
	file_type.cpp
	gui_handle.cpp
	gui_handle_data.cpp
	helper.cpp
	main.cpp
	main_window.cpp
	neighbour_joining_data.cpp
	neighbour_joining_operation.cpp
	operation_interface.cpp
	profile_neighbour_joining_data.cpp
	profile_neighbour_joining_operation.cpp
	profile_selection_dialog.cpp
	runtime_settings.cpp
	settings_dialog.cpp
	task.cpp
	task_container_widget.cpp
	task_manager.cpp
	tree_selection_dialog.cpp
	viewer.cpp
	workspace.cpp
	workspace_tree_model.cpp
	workspace_tree_view.cpp
)

SET(profdist_qt_gui_UI
	ui/about_dialog.ui
	ui/bootstrap_dialog.ui
	ui/distance_dialog.ui
	ui/manual_profile_definition_dialog.ui
	ui/profile_selection_2.ui
	ui/settings_dialog.ui
	ui/small_profile_selection_2.ui
	ui/trait.ui
	ui/tree_selection_dialog.ui
	ui/type.ui
)

SET(WIN_RESOURCE_FILE "")

IF(WIN32)
	EXECUTE_PROCESS(
		COMMAND windres.exe profdistrc.rc "${Profdist_BINARY_DIR}/src/gui/profdistrc.obj"
		WORKING_DIRECTORY "${Profdist_SOURCE_DIR}/src/gui"
	)
	SET(WIN_RESOURCE_FILE "${Profdist_BINARY_DIR}/src/gui/profdistrc.obj")
ENDIF(WIN32)

QT4_WRAP_CPP(profdist_qt_gui_MOC_SOURCES ${profdist_qt_gui_MOC_HEADER})
QT4_WRAP_UI(profdist_qt_gui_UI_HEADER ${profdist_qt_gui_UI})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
QT4_ADD_RESOURCES(profdist_qt_gui_QRC_SOURCES data.qrc)
ADD_EXECUTABLE(profdist_qt ${profdist_qt_gui_SOURCES} ${profdist_qt_gui_MOC_SOURCES} ${profdist_qt_gui_UI_HEADER} ${profdist_qt_gui_QRC_SOURCES} ${WIN_RESOURCE_FILE})
TARGET_LINK_LIBRARIES(profdist_qt profdist ${QT_LIBRARIES})

# The install prefix is stored in CMAKE_INSTALL_PREFIX
INSTALL(TARGETS profdist_qt RUNTIME DESTINATION bin)

