CMakeLists.txt 7.31 KB
Newer Older
Olivier Langella's avatar
   
Olivier Langella committed
1
2
3
4
5
6
7
8
9
10
11
12
13

# this command finds Qt4 libraries and sets all required variables
# note that it's Qt4, not QT4 or qt4

SET (QT_USE_QTXML true)
SET (QT_USE_QTXMLPATTERNS true)
FIND_PACKAGE( Qt4 REQUIRED )

# (QT_USE_FILE is a variable defined by FIND_PACKAGE( Qt4 ) that contains a path to CMake script)
INCLUDE( ${QT_USE_FILE} )

SET(MASSCHROQ_LIB_SRCS
  ./lib/mcq_error.h
Edlira Nano's avatar
Edlira Nano committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  ./lib/share/utilities.cpp

  ./lib/peptides/protein.cpp
  ./lib/peptides/peptide.cpp
  ./lib/peptides/peptide_isotope.cpp
  ./lib/peptides/peptide_observed_in.cpp
  ./lib/peptides/peptide_list.cpp
  ./lib/peptides/isotope_label.cpp
  
  ./lib/quanti_items/quantiItemBase.cpp
  ./lib/quanti_items/quantiItemMzRt.cpp
  ./lib/quanti_items/quantiItemPeptide.cpp

  ./lib/msrun/spectrum.cpp
  ./lib/msrun/precursor.cpp

30
31
  ./lib/msrun/msrun.cpp
  ./lib/msrun/msrun_classic.cpp
32
  ./lib/msrun/slice.cpp
Edlira Nano's avatar
Edlira Nano committed
33
34
  ./lib/msrun/slicer.cpp
  ./lib/msrun/msrun_sliced.cpp
Olivier Langella's avatar
   
Olivier Langella committed
35
36
37
  ./lib/msrun/ms_run_hash_group.cpp
  
  ./lib/quantifications/quantificationMethod.cpp
Edlira Nano's avatar
Edlira Nano committed
38
39
40
  ./lib/quantificator.cpp
  ./lib/mass_chroq.cpp  
  ./lib/peak_matching/peakMatcher.cpp
Olivier Langella's avatar
   
Olivier Langella committed
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
  
  ./lib/detections/peak_detection_moulon.cpp
  ./lib/detections/peak_detection_base.cpp
  ./lib/detections/peak_detection_zivy.cpp
  
  ./lib/alignments/alignment_base.cpp
  ./lib/alignments/alignment_obiwarp.cpp
  ./lib/alignments/alignment_ms2.cpp
  ./lib/alignments/lmatreader.cpp
  
  ./lib/filters/filter_base.cpp
  ./lib/filters/filter_background.cpp
  ./lib/filters/filter_spike.cpp
  ./lib/filters/filter_min_max.cpp
  ./lib/filters/filter_max_min.cpp
  ./lib/filters/filter_smoothing.cpp

  ./lib/xicExtractionMethods/xicExtractionMethodBase.cpp
  ./lib/xicExtractionMethods/xicExtractionMethodMzRange.cpp
  ./lib/xicExtractionMethods/xicExtractionMethodPpmRange.cpp
  
  ./lib/xic/xic_base.cpp
  ./lib/xic/xic_max.cpp
  ./lib/xic/xic_sum.cpp
  ./lib/xic/xic_factory.cpp

  ./lib/peak/xic_peak.cpp
  ./lib/peak/peak_extractor.cpp
  
  ./lib/monitors/monitorBase.cpp
  ./lib/monitors/monitorList.cpp
  ./lib/monitors/mcq_qxmlstreamwriter.cpp  
  ./lib/monitors/quantifResultsBase.cpp	
  ./lib/monitors/tsv_quantif_results.cpp
  ./lib/monitors/xhtmltable_quantif_results.cpp
  ./lib/monitors/gnumeric_quantif_results.cpp
  ./lib/monitors/xicTracesBase.cpp
  ./lib/monitors/tsv_all_xics.cpp
  ./lib/monitors/tsv_peplist_xics.cpp
  ./lib/monitors/tsv_mzlist_xics.cpp
  ./lib/monitors/tsv_mzrt_xics.cpp
  ./lib/monitors/masschroqWriter.cpp
  
  ./reporters/ReporterConsole.cpp
  )

SET(SAXLIB_SRCS
88
  ./encode/decodeBinary.cpp
89
90
91
  ./saxparsers/xmlSimpleParser.cpp
  ./saxparsers/mzxmlSimpleParser.cpp
  ./saxparsers/mzmlSimpleParser.cpp
Edlira Nano's avatar
Edlira Nano committed
92
93
94
  ./saxparsers/xmlSpectrumParser.cpp
  ./saxparsers/mzxmlSpectrumParser.cpp
  ./saxparsers/mzmlSpectrumParser.cpp
95
  ./saxparsers/xmlParserFactory.cpp
96
97
98
  ./saxparsers/xmlToLmatParser.cpp
  ./saxparsers/mzxmlToLmatParser.cpp
  ./saxparsers/mzmlToLmatParser.cpp
99
  ./saxparsers/masschroqmlParser.cpp
Olivier Langella's avatar
   
Olivier Langella committed
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
  ./pepfileparser/masschroq_dom_engine.cpp
  ./pepfileparser/pepParser.cpp	
  )  

SET(OBIWARP_SRCS
  ./libobiwarp/lmat.cpp
  ./libobiwarp/vec.cpp
  ./libobiwarp/mat.cpp
  ./libobiwarp/dynprog.cpp
  )

SET(VIEWXIC_SRCS
  ./qtquanti/mainwindow.cpp
  ./qtquanti/scrollbar.cpp
  ./qtquanti/xicplot.cpp
  ./qtquanti/scrollzoomer.cpp
  ./qtquanti/choose_mz_precision_widget.cpp
  ./qtquanti/visualqms/visual_qms.cpp
  ./qtquanti/visualqms/results/quantif_visual_results.cpp
  )

# another list, this time it includes all header files that should be treated with moc
SET(VIEWXIC_MOC_HDRS
  ./qtquanti/mainwindow.h
  ./qtquanti/scrollbar.h
  ./qtquanti/xicplot.h
  ./qtquanti/scrollzoomer.h
  ./qtquanti/choose_mz_precision_widget.h
  )  

Edlira Nano's avatar
Edlira Nano committed
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# SET(GUI_SRCS
#   ./gui/mainwindow.cpp
#   ./gui/masschroq_gui.cpp
#   ./gui/xicSelectionWidget.cpp
#   ./gui/filterBackgroundWidget.cpp
#   ./gui/plotStyle.cpp
#   ./gui/xicProfile.cpp
#   ./gui/xicPlot.cpp
#   ./gui/plot.cpp
#   ./gui/mcqThread.cpp
#   ./gui/msrunLoaderThread.cpp
#   ./gui/runningBarr.cpp
#   )

# # another list, this time it includes all header files that should be treated with moc
# SET(GUI_MOC_HDRS
#   ./gui/mainwindow.h
#   ./gui/xicSelectionWidget.h
#   ./gui/filterBackgroundWidget.h
#   ./gui/xicProfile.h
#   ./gui/plot.h
#   ./gui/mcqThread.h
#   ./gui/msrunLoaderThread.h
#   ./gui/runningBarr.h
#   )  
Edlira Nano's avatar
Edlira Nano committed
155

Olivier Langella's avatar
   
Olivier Langella committed
156
157
set(CMAKE_MODULE_PATH ${masschroq_SOURCE_DIR}/modules)

Edlira Nano's avatar
Edlira Nano committed
158
159
# set(Qwt5_DIR ${masschroq_SOURCE_DIR}/Modules)
# FIND_PACKAGE(Qwt5 REQUIRED) 
Olivier Langella's avatar
   
Olivier Langella committed
160
161
162
163
164
165
166
167
168
169
170

  
# this command will generate rules that will run rcc on all files from SAMPLE_RCS
# in result SAMPLE_RC_SRCS variable will contain paths to files produced by rcc
#QT4_ADD_RESOURCES( SAMPLE_RC_SRCS ${SAMPLE_RCS} )
  
# this will run uic on .ui files:
#QT4_WRAP_UI( SAMPLE_UI_HDRS ${SAMPLE_UIS} )
  
# and finally this will run moc:

Edlira Nano's avatar
Edlira Nano committed
171
172
# QT4_WRAP_CPP( VIEWXIC_MOC_SRCS ${VIEWXIC_MOC_HDRS} )
# QT4_WRAP_CPP( GUI_MOC_SRCS ${GUI_MOC_HDRS} )
Olivier Langella's avatar
   
Olivier Langella committed
173
174
175
176
  
# 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)

Edlira Nano's avatar
Edlira Nano committed
177
# INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ${Qwt5_INCLUDE_DIR})
Olivier Langella's avatar
   
Olivier Langella committed
178
179
180
181
182
183
184

IF (WIN32)

 ADD_EXECUTABLE(masschroq main.cpp  ${MASSCHROQ_LIB_SRCS} 
  ${SAXLIB_SRCS} ${OBIWARP_SRCS})

 TARGET_LINK_LIBRARIES(masschroq ${QT_LIBRARIES})
Edlira Nano's avatar
Edlira Nano committed
185

Edlira Nano's avatar
Edlira Nano committed
186
ELSE (WIN32)
Edlira Nano's avatar
Edlira Nano committed
187
 
Edlira Nano's avatar
Edlira Nano committed
188
  ADD_LIBRARY(${MASSCHROQ_LIB_NAME} SHARED ${MASSCHROQ_LIB_SRCS} 
Edlira Nano's avatar
Edlira Nano committed
189
190
    ${SAXLIB_SRCS} ${OBIWARP_SRCS})
  
Edlira Nano's avatar
Edlira Nano committed
191
192
193
194
195
  SET_TARGET_PROPERTIES(${MASSCHROQ_LIB_NAME} PROPERTIES 
    VERSION ${MASSCHROQ_LIB_VERSION}
    SOVERSION ${MASSCHROQ_LIB_SOVERSION}
    )
  
Edlira Nano's avatar
Edlira Nano committed
196
  ADD_EXECUTABLE(masschroq_main main.cpp)
Edlira Nano's avatar
Edlira Nano committed
197
  TARGET_LINK_LIBRARIES(masschroq_main ${MASSCHROQ_LIB_NAME} ${QT_LIBRARIES})
Edlira Nano's avatar
Edlira Nano committed
198
  SET_TARGET_PROPERTIES(masschroq_main PROPERTIES OUTPUT_NAME masschroq)
Edlira Nano's avatar
Edlira Nano committed
199

200
201
202
203
  #add new executable called new_parseur
  #ADD_EXECUTABLE(new_parseur parseur.cpp)
  #TARGET_LINK_LIBRARIES(new_parseur ${MASSCHROQ_LIB_NAME} ${QT_LIBRARIES})
  
Olivier Langella's avatar
   
Olivier Langella committed
204
205
ENDIF(WIN32)

Edlira Nano's avatar
Edlira Nano committed
206
207
INSTALL(TARGETS ${MASSCHROQ_LIB_NAME} LIBRARY DESTINATION lib)

Olivier Langella's avatar
   
Olivier Langella committed
208
209
210
# if lib quanti is graphical
#TARGET_LINK_LIBRARIES(masschroq libmasschroq ${QT_LIBRARIES} ${Qwt5_Qt4_LIBRARY})

Edlira Nano's avatar
Edlira Nano committed
211
212
# ADD_EXECUTABLE(viewxic qtquanti/viewxic.cpp ${VIEWXIC_SRCS} ${VIEWXIC_MOC_SRCS})
# TARGET_LINK_LIBRARIES(viewxic ${MASSCHROQ_LIB_NAME} ${QT_LIBRARIES} ${Qwt5_Qt4_LIBRARY})
Olivier Langella's avatar
   
Olivier Langella committed
213

Edlira Nano's avatar
Edlira Nano committed
214
215
# ADD_EXECUTABLE(mcq_gui gui/gui.cpp ${GUI_SRCS} ${GUI_MOC_SRCS})
# TARGET_LINK_LIBRARIES(mcq_gui ${MASSCHROQ_LIB_NAME} ${QT_LIBRARIES} ${Qwt5_Qt4_LIBRARY})
Edlira Nano's avatar
Edlira Nano committed
216
217


Edlira Nano's avatar
Edlira Nano committed
218
#ADD_EXECUTABLE(visualqms visualqms.cpp ${VIEWXIC_SRCS} ${VIEWXIC_MOC_SRCS} ${SAXLIB_SRCS} ${OBWARP_SRCS})
Olivier Langella's avatar
   
Olivier Langella committed
219
220
221
222
223
224
225
226
#TARGET_LINK_LIBRARIES(visualqms libmasschroq ${QT_LIBRARIES} ${Qwt5_Qt4_LIBRARY})

#ADD_EXECUTABLE(align_mzxml align_mzxml.cpp ${MASSCHROQLIB_SRCS} ${SAXLIB_SRCS} ${OBIWARP_SRCS})
#TARGET_LINK_LIBRARIES( align_mzxml ${QT_LIBRARIES})

#ADD_EXECUTABLE( align_mzxml2 align_mzxml2.cpp ${MASSCHROQLIB_SRCS} ${SAXLIB_SRCS} ${OBIWARP_SRCS} )
#TARGET_LINK_LIBRARIES( align_mzxml2 ${QT_LIBRARIES} )

227
228
#ADD_EXECUTABLE(xicextractor xicextractor.cpp ${MASSCHROQ_LIB_SRCS} ${OBIWARP_SRCS} ${SAXLIB_SRCS}
#${XICEXTRACTOR_SRCS})
Olivier Langella's avatar
   
Olivier Langella committed
229
230
231
232
233
#TARGET_LINK_LIBRARIES( xicextractor ${QT_LIBRARIES})

#ADD_EXECUTABLE( obiwarp ./libobiwarp/obiwarp.cpp ${MASSCHROQ_MOC_SRCS} )

#add_subdirectory (libobiwarp)
234

235
#add_subdirectory (qpid)