CMakeLists.txt 9.46 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# CMake script for xtpcpp
# Author: Olivier Langella
# Created: 03/03/2015


SET(xtpcpp_RCCS xtpcpp.qrc)
# 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( Qt5 COMPONENTS Core Gui Svg Xml PrintSupport Sql Network Concurrent REQUIRED )
Langella Olivier's avatar
Langella Olivier committed
15
qt5_add_resources(xtpcpp_RCC_SRCS ${xtpcpp_RCCS})
16

17
if(QCustomPlot_FOUND)
18
    MESSAGE("QCustomPlot_INCLUDES found ${QCustomPlot_INCLUDES}")
19
else(QCustomPlot_FOUND)
20
    FIND_PACKAGE( QCustomPlot REQUIRED )
21
endif(QCustomPlot_FOUND)
22
23
24
25


#sudo apt-get install libpappsomspp-dev

26
27
28
29
30
if(PappsoMSpp_FOUND)
else(PappsoMSpp_FOUND)
  message("PAPPSOms++ library not found")
  message("did you apt-get install libpappsomspp-dev ?")
endif(PappsoMSpp_FOUND)
31

32
33
34
35
if(PappsoMSppWidget_FOUND)
else(PappsoMSppWidget_FOUND)
  message("PAPPSOms++ widget library not found")
  message("did you apt-get install libpappsomspp-widget-dev ?")
Langella Olivier's avatar
Langella Olivier committed
36
endif(PappsoMSppWidget_FOUND)
37

38
message("PAPPSOms++ library : ${PappsoMSpp_LIBRARY}")
39

40
configure_file(${CMAKE_SOURCE_DIR}/src/config.h.cmake ${CMAKE_SOURCE_DIR}/src/config.h)
41
42

# File list
43
set(CPP_FILES
44
  core/automaticfilterparameters.cpp
45
  core/condor_process/condorprocess.cpp
Renne Thomas's avatar
Renne Thomas committed
46
  core/condor_process/condorqxmlsaxhandler.cpp
47
48
49
50
51
52
53
54
  core/identificationgroup.cpp
  core/identification_sources/identificationdatasource.cpp
  core/identification_sources/identificationmascotdatfile.cpp
  core/identification_sources/identificationpepxmlfile.cpp
  core/identification_sources/identificationpwizfile.cpp
  core/identification_sources/identificationxtandemfile.cpp
  core/labeling/label.cpp
  core/labeling/labelingmethod.cpp
55
56
  core/masschroq_run/masschroqbatchprocess.cpp
  core/masschroq_run/masschroqcondorprocess.cpp
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
  core/qvalue/computeqvalues.cpp
  core/tandem_run/tandembatchprocess.cpp
  core/tandem_run/tandemcondorprocess.cpp
  core/tandem_run/tandemparameters.cpp
  core/alignmentgroup.cpp
  core/msrun.cpp
  core/peptideevidence.cpp
  core/peptidematch.cpp
  core/peptidextp.cpp
  core/project.cpp
  core/proteinmatch.cpp
  core/proteinxtp.cpp
  core/sequencedatabase.cpp
  files/fastafile.cpp
  files/tandemparametersfile.cpp
  files/xpipfile.cpp
  grouping/groupingexperiment.cpp
74
  grouping/ptm/ptmacetylation.cpp
75
  grouping/ptm/ptminterface.cpp
76
77
78
79
80
81
  grouping/groupinggroup.cpp
  grouping/groupingpeptidemass.cpp
  grouping/ptm/ptmgroupingexperiment.cpp
  grouping/ptm/ptmisland.cpp
  grouping/ptm/ptmislandgroup.cpp
  grouping/ptm/ptmislandsubgroup.cpp
82
  grouping/ptm/ptmphospho.cpp
83
84
85
  grouping/ptm/ptmsamplescan.cpp
  input/mascot/mascotdatparser.cpp
  input/mascot/mimeparser.cpp
86
#  input/identificationpwizreader.cpp
87
88
89
90
91
92
93
  input/pepxmlsaxhandler.cpp
  input/xpipsaxhandler.cpp
  input/xtandemparamsaxhandler.cpp
  input/xtandemsaxhandler.cpp
  input/xtpxpipsaxhandler.cpp
  output/mcqr/mcqrscprotein.cpp
  output/mcqr/mcqrscpeptide.cpp
94
95
  output/ods/mass_delta/validmassdeltasheet.cpp
  output/ods/mass_delta/notvalidmassdeltasheet.cpp
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
  output/ods/ptm/ptmislandsheet.cpp
  output/ods/ptm/ptmspectrasheet.cpp
  output/ods/comparbasesheet.cpp
  output/ods/comparspecificspectrasheet.cpp
  output/ods/comparspectrabypeptide.cpp
  output/ods/comparspectrasheet.cpp
  output/ods/groupingsheet.cpp
  output/ods/infosheet.cpp
  output/ods/odsexport.cpp
  output/ods/peptidepossheet.cpp
  output/ods/peptidesheet.cpp
  output/ods/proteinsheet.cpp
  output/ods/qvaluessheet.cpp
  output/ods/samplesheet.cpp
  output/ods/simplesheet.cpp
  output/ods/spectrasheet.cpp
  output/ods/spectrasheetall.cpp
Renne Thomas's avatar
Renne Thomas committed
113
  output/ods/xicareasheet.cpp
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
  output/exportfastafile.cpp
  output/masschroqml.cpp
  output/masschroqprm.cpp
  output/mcqrspectralcount.cpp
  output/proticdbml.cpp
  output/xpip.cpp
  utils/fastafilestore.cpp
  utils/identificationdatasourcestore.cpp
  utils/groupstore.cpp
  utils/httpversion.cpp
  utils/msrunstatisticshandler.cpp
  utils/msrunstore.cpp
  utils/peptideevidencestore.cpp
  utils/peptidestore.cpp
  utils/proteinstore.cpp
129
  utils/ptmbuilder.cpp
130
131
132
133
  utils/utils.cpp
)

# we need this to be able to include headers produced by uic in our code
134
#(CMAKE_BINARY_DIR holds a path to the build directory, while INCLUDE_DIRECTORIES() works just like INCLUDEPATH from qmake)
135

136
set(XTPCPP_SRCS
137
138
139
140
141
142
143
144
145
146
147
148
149
  ./gui/about_dialog/aboutdialog.cpp
  ./gui/choose_modification_dialog/choosemodificationdialog.cpp
  ./gui/edit/edit_label_methods/editlabelmethods.cpp
  ./gui/edit/edit_modifications/editmodifications.cpp
  ./gui/edit/edit_settings/editsettings.cpp
  ./gui/edit/edit_tandem_preset_dialog/edittandempresetdialog.cpp
  ./gui/export/export_spreadsheet_dialog/exportspreadsheetdialog.cpp
  ./gui/load_results_dialog/loadresultsdialog.cpp
  ./gui/lists/ms_identification_run_list_view/msidentificationlistwindow.cpp
  ./gui/lists/ms_identification_run_list_view/msidentificationtablemodel.cpp
  ./gui/lists/ms_identification_run_list_view/msidentificationtableproxymodel.cpp
  ./gui/lists/ms_identification_run_list_view/ms_identification_worker/msidlistworkerstatus.cpp
  ./gui/lists/ms_identification_run_list_view/engine_detail_view/enginedetailwindow.cpp
150
151
  ./gui/masschroq_run_dialog/masschroqrundialog.cpp
  ./gui/masschroq_run_dialog/masschroqfileparameters.cpp
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
  ./gui/mainwindow.cpp
  ./gui/peptide_detail_view/peptidewindow.cpp
  ./gui/peptide_list_view/peptidelistwindow.cpp
  ./gui/peptide_list_view/peptidetablemodel.cpp
  ./gui/peptide_list_view/peptidetableproxymodel.cpp
  ./gui/project_view/identification_group_widget/identificationgroupwidget.cpp
  ./gui/project_view/projectwindow.cpp
  ./gui/protein_view/proteinwindow.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/widgets/Alignment_group_menu/alignmentgroupmenu.cpp
  ./gui/widgets/automatic_filter_widget/automaticfilterwidget.cpp
  ./gui/widgets/engines_view/xtandemparamwidget.cpp
  ./gui/widgets/engines_view/noengineparamwidget.cpp
  ./gui/widgets/contaminant_widget/contaminantwidget.cpp
  ./gui/widgets/decoy_widget/decoywidget.cpp
  ./gui/widgets/xic_extraction_method_widget/xicextractionmethodwidget.cpp
  ./gui/widgets/massitemdelegate.cpp
  ./gui/xic_view/xic_box/xicbox.cpp
  ./gui/xic_view/xic_widgets/zivydialog.cpp
  ./gui/xic_view/xic_widgets/zivywidget.cpp
  ./gui/xic_view/xicwindow.cpp
  ./gui/xic_view/xicworkerthread.cpp
  ./gui/workerthread.cpp
  ./utils/workmonitor.cpp
)

189
set(GUI_UIS
190
191
192
193
194
195
196
197
198
199
200
  ./gui/about_dialog/about_dialog.ui
  ./gui/choose_modification_dialog/choose_modification_dialog.ui
  ./gui/edit/edit_alignment_param/masschroq_param_view.ui
  ./gui/edit/edit_label_methods/edit_label_methods.ui
  ./gui/edit/edit_modifications/edit_modifications.ui
  ./gui/edit/edit_settings/edit_settings.ui
  ./gui/edit/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui
  ./gui/export/export_spreadsheet_dialog/export_spreadsheet_dialog.ui
  ./gui/lists/ms_identification_run_list_view/ms_identification_run_view.ui
  ./gui/lists/ms_identification_run_list_view/engine_detail_view/engine_detail_view.ui
  ./gui/load_results_dialog/load_results_dialog.ui
201
  ./gui/masschroq_run_dialog/masschroq_run_dialog.ui
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
  ./gui/main.ui
  ./gui/peptide_detail_view/peptide_detail_view.ui
  ./gui/peptide_list_view/peptide_view.ui
  ./gui/project_view/identification_group_widget/identification_group_widget.ui
  ./gui/project_view/project_view.ui
  ./gui/protein_list_view/protein_view.ui
  ./gui/protein_view/protein_detail_view.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/widgets/automatic_filter_widget/automatic_filter_widget.ui
  ./gui/widgets/engines_view/xtandem_view_widget.ui
  ./gui/widgets/engines_view/no_engine_view_widget.ui
  ./gui/widgets/contaminant_widget/contaminant_widget.ui
  ./gui/widgets/decoy_widget/decoy_widget.ui
  ./gui/xic_view/xic_box/xic_box.ui
  ./gui/xic_view/xic_widgets/zivy_widget.ui
  ./gui/xic_view/xic_window.ui
)


# this will run uic on .ui files:
Langella Olivier's avatar
Langella Olivier committed
225
qt5_wrap_ui( GUI_UI_HDRS ${GUI_UIS} )
226
227


228
message("XTPCPP_SRCS:  ${XTPCPP_SRCS}")
229
230


231
add_executable(xtpcpp main.cpp ${CPP_FILES} ${XTPCPP_SRCS} ${GUI_UI_HDRS} ${xtpcpp_RCC_SRCS})
232

233
target_include_directories(xtpcpp PUBLIC
Langella Olivier's avatar
Langella Olivier committed
234
235
    ${Quazip5_INCLUDE_DIRS}
    ${QCustomPlot_INCLUDE_DIR}
236
237
)

Langella Olivier's avatar
Langella Olivier committed
238
if(MXE)
239
240
241
242
    target_compile_options(
        xtpcpp PRIVATE -mwindows
    )
    set_target_properties(xtpcpp PROPERTIES LINK_FLAGS "-Wl,--subsystem,windows ${CMAKE_EXE_LINKER_FLAGS}")
Langella Olivier's avatar
Langella Olivier committed
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
endif(MXE)

target_link_libraries(xtpcpp
    OdsStream::Core
    PappsoMSpp::Core
    PappsoMSpp::Widget
    Qt5::Core
    Qt5::Gui
    Qt5::Xml
    Qt5::Svg
    Qt5::PrintSupport
    Qt5::Network
    Qt5::Sql
    Qt5::Concurrent
    ZLIB::ZLIB
    ${QCustomPlot_LIBRARIES}
    ${Quazip5_LIBRARY}
)
261
262
263
264
265
266




install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/xtpcpp DESTINATION bin)

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