Newer
Older
# CMake script for xtpcpp
# Author: Olivier Langella
# Created: 03/03/2015
# Appeler automatique le moc quand nécessaire
#SET(CMAKE_AUTOMOC ON)
# Les fichiers générés par le moc sont générés dans le dossier bin, dire à CMake de toujours
# inclure les entêtes de ce dossier
#SET(CMAKE_INCLUDE_CURRENT_DIR ON)
#FIND_PACKAGE(Boost REQUIRED)
#INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS})
FIND_PACKAGE( Qt5 COMPONENTS Core Gui Svg Xml REQUIRED )
QT5_ADD_RESOURCES(xtpcpp_RCC_SRCS ${xtpcpp_RCCS})
FIND_PACKAGE( Odsstream REQUIRED ) #ODSSTREAM_INCLUDE_DIR AND ODSSTREAM_LIBRARY
#SET (ODSSTREAM_DIR "/home/olivier/eclipse/git/cpp_libodsstream")
#SET (ODSSTREAM_INCLUDE_DIR "${ODSSTREAM_DIR}/src")
#SET (ODSSTREAM_QT5_LIBRARY "${ODSSTREAM_DIR}/build/src/libodsstream-qt5.so")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Xml_EXECUTABLE_COMPILE_FLAGS} ${Qt5Gui_EXECUTABLE_COMPILE_FLAGS} ${Qt5Svg_EXECUTABLE_COMPILE_FLAGS}")
SET (PAPPSOMSPP_DIR "/home/olivier/eclipse/git/pappsomspp")
# SET (PAPPSOMSPP_DIR "/home/langella/developpement/git/pappsomspp")
SET (PAPPSOMSPP_INCLUDE_DIR "${PAPPSOMSPP_DIR}/src")
SET (PAPPSOMSPP_QT5_LIBRARY "${PAPPSOMSPP_DIR}/cbuild/src/libpappsomspp-qt5.so")
SET (PAPPSOMSPP_QT4_LIBRARY "${PAPPSOMSPP_DIR}/cbuild/src/libpappsomspp-qt4.so")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules)
FIND_PACKAGE(Pwiz REQUIRED)
IF (Pwiz_FOUND)
#INCLUDE_DIRECTORIES( ${Pwiz_INCLUDE_DIR})
#FIND_PACKAGE(Boost REQUIRED)
#INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS})
ELSE (Pwiz_FOUND)
MESSAGE("Proteowizard library not found")
MESSAGE("did you apt-get install libpwiz-dev libboost-dev ?")
ENDIF (Pwiz_FOUND)
configure_file (${CMAKE_SOURCE_DIR}/src/config.h.cmake ${CMAKE_SOURCE_DIR}/src/config.h)
# File list
SET(CPP_FILES
core/identification_sources/identificationdatasource.cpp
core/identification_sources/identificationpwizfile.cpp
core/identification_sources/identificationxtandemfile.cpp
core/labeling/label.cpp
core/labeling/labelingmethod.cpp
core/tandem_run/tandembatchprocess.cpp
core/tandem_run/tandemparameters.cpp
core/peptidextp.cpp
core/proteinxtp.cpp
core/sequencedatabase.cpp
files/fastafile.cpp
grouping/ptm/ptmgroupingexperiment.cpp
grouping/ptm/ptmisland.cpp
grouping/ptm/ptmislandsubgroup.cpp
grouping/ptm/ptmsamplescan.cpp
gui/peptide_detail_view/spectrum_widget/spectrumpainter.cpp
utils/identificationdatasourcestore.cpp
utils/msrunstore.cpp
# we need this to be able to include headers produced by uic in our code
# (CMAKE_BINARY_DIR holds a path to the build directory, while INCLUDE_DIRECTORIES() works just like INCLUDEPATH from qmake)
SET(XTPCPP_SRCS
./gui/choose_modification_dialog/choosemodificationdialog.cpp
./gui/edit_modifications/editmodifications.cpp
./gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp
./gui/export_spreadsheet_dialog/exportspreadsheetdialog.cpp
./gui/load_results_dialog/loadresultsdialog.cpp
./gui/peptide_detail_view/peptidewindow.cpp
./gui/peptide_detail_view/spectrum_widget/overlaywidget.cpp
./gui/peptide_detail_view/spectrum_widget/qspectrumwidget.cpp
./gui/peptide_list_view/peptidelistwindow.cpp
./gui/peptide_list_view/peptidetablemodel.cpp
./gui/project_view/automatic_filter_widget/automaticfilterwidget.cpp
./gui/project_view/identification_group_widget/identificationgroupwidget.cpp
./gui/protein_list_view/proteinlistwindow.cpp
./gui/protein_list_view/proteintablemodel.cpp
./gui/protein_list_view/proteintableproxymodel.cpp
./gui/ptm_island_list_view/ptmislandlistwindow.cpp
./gui/ptm_island_list_view/ptmislandtablemodel.cpp
./gui/ptm_island_list_view/ptmislandproxymodel.cpp
./gui/ptm_peptide_list_view/ptmpeptidelistwindow.cpp
./gui/ptm_peptide_list_view/ptmpeptidetablemodel.cpp
./gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.cpp
./gui/ptm_peptide_list_view/ptmsequencedelegate.cpp
./gui/tandem_run_dialog/tandemrundialog.cpp
./gui/waiting_message_dialog/waitingmessagedialog.cpp
./gui/choose_modification_dialog/choose_modification_dialog.ui
./gui/edit_modifications/edit_modifications.ui
./gui/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui
./gui/export_spreadsheet_dialog/export_spreadsheet_dialog.ui
./gui/load_results_dialog/load_results_dialog.ui
./gui/peptide_detail_view/peptide_detail_view.ui
./gui/project_view/automatic_filter_widget/automatic_filter_widget.ui
./gui/project_view/identification_group_widget/identification_group_widget.ui
./gui/ptm_island_list_view/ptm_island_list_view.ui
./gui/ptm_peptide_list_view/ptm_peptide_list_view.ui
./gui/tandem_run_dialog/tandem_run_dialog.ui
./gui/waiting_message_dialog/waiting_message_dialog.ui
./gui/choose_modification_dialog/choosemodificationdialog.h
./gui/edit_modifications/editmodifications.h
./gui/edit_tandem_preset_dialog/edittandempresetdialog.h
./gui/export_spreadsheet_dialog/exportspreadsheetdialog.h
./gui/load_results_dialog/loadresultsdialog.h
./gui/peptide_detail_view/spectrum_widget/overlaywidget.h
./gui/peptide_detail_view/spectrum_widget/qspectrumwidget.h
./gui/peptide_list_view/peptidelistwindow.h
./gui/peptide_list_view/peptidetablemodel.h
./gui/project_view/automatic_filter_widget/automaticfilterwidget.h
./gui/project_view/identification_group_widget/identificationgroupwidget.h
./gui/protein_list_view/proteinlistwindow.h
./gui/protein_list_view/proteintablemodel.h
./gui/protein_list_view/proteintableproxymodel.h
./gui/ptm_island_list_view/ptmislandlistwindow.h
./gui/ptm_island_list_view/ptmislandtablemodel.h
./gui/ptm_island_list_view/ptmislandproxymodel.h
./gui/ptm_peptide_list_view/ptmpeptidelistwindow.h
./gui/ptm_peptide_list_view/ptmpeptidetablemodel.h
./gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.h
./gui/ptm_peptide_list_view/ptmsequencedelegate.h
./gui/tandem_run_dialog/tandemrundialog.h
./gui/waiting_message_dialog/waitingmessagedialog.h
)
# this will run uic on .ui files:
QT5_WRAP_CPP( XTPCPP_MOC_SRCS ${XTPCPP_MOC_HDRS} )
ADD_EXECUTABLE(xtpcpp main.cpp ${CPP_FILES} ${XTPCPP_SRCS} ${GUI_UI_HDRS} ${XTPCPP_MOC_SRCS} ${xtpcpp_RCC_SRCS})
target_include_directories (xtpcpp PUBLIC ${Pwiz_INCLUDE_DIR} ${PAPPSOMSPP_INCLUDE_DIR} ${ODSSTREAM_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/gui/peptide_detail_view/spectrum_widget ${CMAKE_CURRENT_SOURCE_DIR}/gui/peptide_detail_view/spectrum_widget)
target_compile_definitions(xtpcpp PUBLIC ${QT_DEFINITIONS})
SET_TARGET_PROPERTIES(xtpcpp
PROPERTIES OUTPUT_NAME xtpcpp
CLEAN_DIRECT_OUTPUT 1
#INCLUDE_DIRECTORIES "${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}"
)
TARGET_LINK_LIBRARIES(xtpcpp ${PAPPSOMSPP_QT5_LIBRARY} ${Pwiz_LIBRARY} ${ODSSTREAM_QT5_LIBRARY}
Qt5::Gui Qt5::Xml Qt5::Svg)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/xtpcpp DESTINATION bin)
#configure_file (${CMAKE_SOURCE_DIR}/templates/share/applications/pt-peptideviewer.desktop.cmake ${CMAKE_BINARY_DIR}/templates/share/applications/pt-peptideviewer.desktop)