    
QT6_ADD_RESOURCES(pappsomstools_RCC_SRCS_QT5 ${pappsomstools_RCCS})

SET(PT_PEPTIDE_VIEWER_SRCS
	spectrumviewer/spectrumwindow.cpp
	spectrumparam/spectrumparam.cpp
	spectrumparam/tandemparam/tandemparam.cpp
	peptideviewer.cpp
	main.cpp
	peptideeditor/peptidetablemodel.cpp
	peptideeditor/peptidemasstablemodel.cpp
	iontableviewer/iontablewindow.cpp
	iontableviewer/iontablemodel.cpp
	timsframeviewer/timsframeimbrowser.cpp
	timsframeviewer/timsframewindow.cpp
	../utils/fragmentator.cpp
)

SET (GUI_UIS
	peptide_viewer.ui
	spectrumviewer/spectrumwindow.ui
	spectrumparam/spectrumparam.ui
	spectrumparam/tandemparam/tandemparam.ui
	iontableviewer/iontablewindow.ui
	timsframeviewer/timsframewindow.ui
)


# this will run uic on .ui files:
QT6_WRAP_UI( GUI_UI_HDRS ${GUI_UIS} )

add_executable(pt-peptideviewer ${pappsomstools_RCC_SRCS_QT5} ${PT_PEPTIDE_VIEWER_SRCS} ${GUI_UI_HDRS})


set_target_properties(pt-peptideviewer
    PROPERTIES OUTPUT_NAME pt-peptideviewer
    CLEAN_DIRECT_OUTPUT 1
    COMPILE_DEFINITIONS "${QT_DEFINITIONS} QCUSTOMPLOT_USE_LIBRARY"
    #INCLUDE_DIRECTORIES "${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}"
    )
    
target_link_libraries(pt-peptideviewer
    PappsoMSpp::Core
    PappsoMSpp::Gui
    Qt6::Core
    Qt6::Widgets
    Qt6::Qml
    Qt6::Gui
    Qt6::Sql
    Qt6::Svg
    OdsStream::Core
	QuaZip::QuaZip
	QCustomPlotQt6::QCustomPlotQt6
)


INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pt-peptideviewer DESTINATION bin)

configure_file (${CMAKE_SOURCE_DIR}/templates/share/applications/pt-peptideviewer.desktop.cmake ${CMAKE_BINARY_DIR}/templates/share/applications/pt-peptideviewer.desktop)


INSTALL(FILES ${CMAKE_SOURCE_DIR}/doc/images/pappsoms-tools.svg DESTINATION share/pappsoms-tools)

INSTALL(FILES ${CMAKE_BINARY_DIR}/templates/share/applications/pt-peptideviewer.desktop DESTINATION share/applications)
