CMakeLists.txt 11.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
#
# This file is part of the ViTE project.
#
# This software is governed by the CeCILL-A license under French law
# and abiding by the rules of distribution of free software. You can
# use, modify and/or redistribute the software under the terms of the
# CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
# URL: "http://www.cecill.info".
#
# As a counterpart to the access to the source code and rights to copy,
# modify and redistribute granted by the license, users are provided
# only with a limited warranty and the software's author, the holder of
# the economic rights, and the successive licensors have only limited
# liability.
#
# In this respect, the user's attention is drawn to the risks associated
# with loading, using, modifying and/or developing or reproducing the
# software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also
# therefore means that it is reserved for developers and experienced
# professionals having in-depth computer knowledge. Users are therefore
# encouraged to load and test the software's suitability as regards
# their requirements in conditions enabling the security of their
# systems and/or data to be ensured and, more generally, to use and
# operate it in the same conditions as regards security.
#
# The fact that you are presently reading this means that you have had
# knowledge of the CeCILL-A license and that you accept its terms.
#
# ViTE developers are (for version 0.* to 1.0):
#
#        - COULOMB Kevin
#        - FAVERGE Mathieu
#        - JAZEIX Johnny
#        - LAGRASSE Olivier
#        - MARCOUEILLE Jule
#        - NOISETTE Pascal
#        - REDONDY Arthur
#        - VUCHENER Clment
#        - (RICHART Nicolas)
#
#

SET(VITE_HDRS
  common/common.hpp
  common/Message.hpp
  common/Errors.hpp
  common/Tools.hpp
49
  common/Info.hpp
50
  common/Session.hpp
51
  common/Memory.hpp
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
  # Data structure headers
  trace/values/Color.hpp
  trace/values/Date.hpp
  trace/values/Double.hpp
  trace/values/Hex.hpp
  trace/values/Integer.hpp
  trace/values/Name.hpp
  trace/values/String.hpp
  trace/values/Value.hpp
  trace/values/Values.hpp
  trace/tree/BinaryTree.hpp
  trace/tree/Node.hpp
  trace/tree/Interval.hpp
  trace/ContainerType.hpp
  trace/EntityType.hpp
  trace/EventType.hpp
  trace/StateType.hpp
  trace/LinkType.hpp
  trace/VariableType.hpp
  trace/EntityTypes.hpp
  trace/EntityValue.hpp
  trace/Container.hpp
  trace/Entity.hpp
  trace/Event.hpp
  trace/State.hpp
  trace/StateChange.hpp
  trace/Link.hpp
  trace/Entitys.hpp
  trace/Variable.hpp
  trace/DrawTrace.hpp
  trace/DrawTree.hpp
  trace/Trace.hpp
Augustin Degomme's avatar
Augustin Degomme committed
84
  trace/IntervalOfContainer.hpp
85
  # Render headers
86
  render/Palette.hpp
Olivier Lagrasse's avatar
Olivier Lagrasse committed
87
  render/Render.hpp
88
  render/Geometry.hpp
89
  render/Hook_event.hpp
90
  render/Minimap.hpp
91
  render/Render_opengl.hpp
Olivier Lagrasse's avatar
Olivier Lagrasse committed
92
  render/Render_svg.hpp
93 94 95
  render/render_stats.hpp
  render/render_stats_opengl.hpp
  render/render_stats_svg.hpp
96
  render/Ruler.hpp
97 98
  # Interface headers
  interface/resource.hpp
99
  interface/Interface.hpp
100
  interface/Settings_window.hpp
101
  interface/Interface_graphic.hpp
Augustin Degomme's avatar
fixes :  
Augustin Degomme committed
102 103
  interface/Node_select.hpp
  interface/viteqtreewidget.hpp
104 105 106
  interface/Interval_select.hpp
  interface/qxtspanslider.h
  interface/qxtspanslider_p.h
107 108
  # Core header
  core/Core.hpp
Augustin Degomme's avatar
fixes :  
Augustin Degomme committed
109
  core/getopt.h
110
  # Parser headers
111
  parser/ParsingThread.hpp
112
  parser/Parser.hpp
113 114
  parser/ParserFactory.hpp
  # Paje 
115 116 117 118 119 120
  parser/PajeParser/PajeDefinition.hpp
  parser/PajeParser/PajeFileManager.hpp
  parser/PajeParser/ParserDefinitionPaje.hpp
  parser/PajeParser/ParserEventPaje.hpp
  parser/PajeParser/ParserPaje.hpp
  parser/PajeParser/ParserVite.hpp
121
  #Multithread Paje
122 123 124 125
  parser/PajeParser/mt_ParserEventPaje.hpp
  parser/PajeParser/mt_ParserPaje.hpp
  parser/PajeParser/mt_PajeFileManager.hpp
  parser/PajeParser/BuilderThread.hpp
126
  trace/TraceBuilderThread.hpp
127 128 129 130 131 132 133
  # Statistics headers
  statistics/Stats_window.hpp
  statistics/Statistic.hpp
  statistics/DrawStats.hpp
  statistics/DrawVDiagram.hpp
  statistics/DrawHDiagram.hpp
  statistics/DrawCounter.hpp
134 135
  # Plugin header
  plugin/Command_window.hpp
136 137
  plugin/Plugin_window.hpp
  plugin/Plugin.hpp
138 139 140 141
)

SET(VITE_UIS
  interface/info_window.ui
142
  interface/settings.ui
143 144 145
  interface/main_window.ui
  interface/option_export_window.ui
  interface/stats_viewer.ui
146
  interface/global_cmd.ui
Mathieu Faverge's avatar
Mathieu Faverge committed
147
  interface/list_of_counter_to_export.ui
Augustin Degomme's avatar
fixes :  
Augustin Degomme committed
148
  interface/node_select.ui
149
  interface/interval_select.ui
150 151 152 153 154 155 156
)

SET(VITE_SRCS
  # Messages & Errors 
  common/Message.cpp
  common/Errors.cpp
  common/Tools.cpp
157
  common/Info.cpp
158
  common/Session.cpp
159
  common/Memory.cpp
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
  # Data structure code files
  trace/values/Color.cpp
  trace/values/Date.cpp
  trace/values/Double.cpp
  trace/values/Hex.cpp
  trace/values/Integer.cpp
  trace/values/Name.cpp
  trace/values/String.cpp
  trace/tree/Interval.cpp
  trace/EntityValue.cpp
  trace/ContainerType.cpp
  trace/EntityType.cpp
  trace/EventType.cpp
  trace/StateType.cpp
  trace/LinkType.cpp
  trace/VariableType.cpp
  trace/Entity.cpp
  trace/Event.cpp
  trace/State.cpp
  trace/StateChange.cpp
  trace/Link.cpp
  trace/Variable.cpp
  trace/Container.cpp
  trace/Trace.cpp
Augustin Degomme's avatar
Augustin Degomme committed
184
  trace/IntervalOfContainer.cpp
185
  # Render code files
186
  render/Palette.cpp
187
  render/Geometry.cpp
188
  render/Hook_event.cpp
Olivier Lagrasse's avatar
Olivier Lagrasse committed
189
  render/Render.hpp
190
  render/Minimap.cpp
191
  render/Render_opengl.cpp
Olivier Lagrasse's avatar
Olivier Lagrasse committed
192
  render/Render_svg.cpp
193 194
  render/render_stats_opengl.cpp
  render/render_stats_svg.cpp
195
  render/Ruler.cpp
196
  # Parser code files
197 198 199 200
  parser/Parser.cpp
  parser/ParserFactory.cpp
  parser/ParsingThread.cpp
  # Paje Parser
201 202 203 204 205 206
  parser/PajeParser/PajeDefinition.cpp
  parser/PajeParser/PajeFileManager.cpp
  parser/PajeParser/ParserDefinitionPaje.cpp
  parser/PajeParser/ParserEventPaje.cpp
  parser/PajeParser/ParserPaje.cpp
  parser/PajeParser/ParserVite.cpp
207
  #Multithread Paje Parser
208 209 210 211
  parser/PajeParser/mt_ParserEventPaje.cpp
  parser/PajeParser/mt_ParserPaje.cpp
  parser/PajeParser/mt_PajeFileManager.cpp
  parser/PajeParser/BuilderThread.cpp
212
  trace/TraceBuilderThread.cpp
213 214 215 216
  # Statistics code files
  statistics/Statistic.cpp
  statistics/Stats_window.cpp
  # Interface code files
217
  interface/Settings_window.cpp
218
  interface/Interface_graphic.cpp
Augustin Degomme's avatar
fixes :  
Augustin Degomme committed
219 220
  interface/Node_select.cpp
  interface/viteqtreewidget.cpp
221 222
  interface/Interval_select.cpp
  interface/qxtspanslider.cpp
223 224
  # Plugin code file
  plugin/Command_window.cpp
225 226 227
  plugin/Plugin_window.cpp
  plugin/Plugin.cpp
  # Core code files
228
  core/Core.cpp
Augustin Degomme's avatar
fixes :  
Augustin Degomme committed
229
  core/getopt.c
230 231 232 233 234 235 236 237
  # Main
  main.cpp
  )

SET(VITE_RCCS
  interface/vite.qrc
  )

238 239 240
#############################################
#           QtColorPicker
#############################################
Mathieu Faverge's avatar
Test  
Mathieu Faverge committed
241 242
set(QTCOLORPICKERDIR
  ${CMAKE_SOURCE_DIR}/externals/qtcolorpicker/src
243 244
  )

Mathieu Faverge's avatar
Test  
Mathieu Faverge committed
245
set(VITE_HDRS
246
  ${VITE_HDRS}
247
  ${QTCOLORPICKERDIR}/qtcolorpicker.h
248 249
  )

Mathieu Faverge's avatar
Test  
Mathieu Faverge committed
250
set(VITE_SRCS
251 252 253 254 255 256 257
  ${VITE_SRCS}
  ${QTCOLORPICKERDIR}/qtcolorpicker.cpp
  )

#############################################
#                VBO
#############################################
258 259 260 261 262 263
IF(VITE_ENABLE_VBO)
  ADD_DEFINITIONS(-DWITH_VBO)

  SET(VITE_HDRS
    ${VITE_HDRS}
    render/vbo.hpp
264
    render/Render_alternate.hpp
265 266 267 268 269
    )

  SET(VITE_SRCS
    ${VITE_SRCS}
    render/vbo.cpp
270
    render/Render_alternate.cpp
271 272 273
    )  
ENDIF(VITE_ENABLE_VBO)

274 275 276
#############################################
#              OTF Parser
#############################################
277 278 279 280 281
IF(VITE_ENABLE_OTF)
  ADD_DEFINITIONS(-DWITH_OTF)

  SET(VITE_HDRS
    ${VITE_HDRS}
282 283 284 285 286 287
    parser/OTFParser/ParserDefinitionOTF.hpp
    parser/OTFParser/ParserEventOTF.hpp
    parser/OTFParser/ParserOTF.hpp
    parser/OTFParser/mt_ParserEventOTF.hpp
    parser/OTFParser/mt_ParserOTF.hpp
    parser/OTFParser/OTFTraceBuilderThread.hpp
288 289 290 291
    )

  SET(VITE_SRCS
    ${VITE_SRCS}
292 293 294 295 296 297
    parser/OTFParser/ParserDefinitionOTF.cpp
    parser/OTFParser/ParserEventOTF.cpp
    parser/OTFParser/ParserOTF.cpp
    parser/OTFParser/mt_ParserEventOTF.cpp
    parser/OTFParser/mt_ParserOTF.cpp
    parser/OTFParser/OTFTraceBuilderThread.cpp
298 299 300 301 302 303
    )

  INCLUDE_DIRECTORIES(${OTF_INCLUDE_DIR})

ENDIF(VITE_ENABLE_OTF)

304 305 306
#############################################
#              TAU Parser
#############################################
307 308 309 310 311
IF(VITE_ENABLE_TAU)
  ADD_DEFINITIONS(-DWITH_TAU)

  SET(VITE_HDRS
    ${VITE_HDRS}
312 313
    parser/TauParser/ParserTau.hpp
    parser/TauParser/TauStructs.hpp
314 315 316 317
    )

  SET(VITE_SRCS
    ${VITE_SRCS}
318
    parser/TauParser/ParserTau.cpp
319 320 321 322 323 324 325 326
    )

  INCLUDE_DIRECTORIES(${TAU_INCLUDE_DIR})

ENDIF(VITE_ENABLE_TAU)

#ADD_DEFINITIONS(-DMEMORY_USAGE)
#ADD_DEFINITIONS(-DMEMORY_TRACE)
327

328 329 330 331 332
  
#############################################
#                BOOST
#############################################
IF(VITE_ENABLE_SERIALIZATION)
Mathieu Faverge's avatar
Mathieu Faverge committed
333 334 335 336 337
  link_directories ( ${Boost_LIBRARY_DIRS} )
  include_directories ( ${Boost_INCLUDE_DIRS} )
  add_definitions("-DUSE_ITC -DBOOST_SERIALIZE")
  
  SET(VITE_HDRS
338 339 340 341 342 343
    ${VITE_HDRS}
    parser/ParserSplitted.hpp 
    trace/IntervalOfContainer.hpp 
    trace/SerializerWriter.hpp 
    trace/SerializerDispatcher.hpp
    )
Mathieu Faverge's avatar
Mathieu Faverge committed
344
  
345 346 347 348 349 350 351
  SET(VITE_SRCS
    ${VITE_SRCS}
    parser/ParserSplitted.cpp 
    trace/IntervalOfContainer.cpp 
    trace/SerializerWriter.cpp 
    trace/SerializerDispatcher.cpp
    )  
Mathieu Faverge's avatar
Mathieu Faverge committed
352
  
353 354 355
ENDIF(VITE_ENABLE_SERIALIZATION)


356 357 358
#############################################
#              QT4
#############################################
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374
QT4_AUTOMOC(${VITE_SRCS})
FOREACH(_hdrs_file ${VITE_HDRS})
  GET_FILENAME_COMPONENT(_abs_file ${_hdrs_file} ABSOLUTE)
  FILE(READ ${_abs_file} _contents)
  STRING(REGEX MATCHALL "Q_OBJECT" _match "${_contents}")
  IF(_match)
    SET(VITE_MOC_HDRS ${VITE_MOC_HDRS} ${_hdrs_file})
  ENDIF(_match)
ENDFOREACH(_hdrs_file ${VITE_HDRS})

QT4_WRAP_UI(VITE_UIS_H ${VITE_UIS})
QT4_WRAP_CPP(VITE_MOC ${VITE_UIS_H} ${VITE_MOC_HDRS})
QT4_ADD_RESOURCES(VITE_RCC_SRCS ${VITE_RCCS})

ADD_DEFINITIONS(-DQT_NO_DEBUG)

375 376
#############################################

377 378 379
INCLUDE_DIRECTORIES(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
380
  ${QTCOLORPICKERDIR}
381
)
382
#ADD_LIBRARY(vite2 SHARED ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS})
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400

if( APPLE )
  SET( OSX_ICON_FILES "interface/icon/mac_logo.icns")
  set_source_files_properties(${OSX_ICON_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
  ADD_EXECUTABLE(vite MACOSX_BUNDLE ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS} ${OSX_ICON_FILES})
  SET_TARGET_PROPERTIES(vite PROPERTIES 
         MACOSX_BUNDLE_INFO_STRING "ViTE"
         MACOSX_BUNDLE_ICON_FILE "mac_logo.icns"
         MACOSX_BUNDLE_LONG_VERSION_STRING "Visual Trace Explorer - version ${VITE_VERSION_MAJOR}.${VITE_VERSION_MINOR}"
         MACOSX_BUNDLE_BUNDLE_NAME "Vite-MacOSX"
         MACOSX_BUNDLE_SHORT_VERSION_STRING "ViTE-${VITE_VERSION_MAJOR}.${VITE_VERSION_MINOR}"
         MACOSX_BUNDLE_BUNDLE_VERSION "1.0"
         MACOSX_BUNDLE_COPYRIGHT "INRIA 2006-2012"
       	 MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/vite-info.plist.in)
else( APPLE )
  ADD_EXECUTABLE(vite ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS})
endif( APPLE )

401 402
TARGET_LINK_LIBRARIES(vite
  ${QT_LIBRARIES}
403
  ${GLU_LIBRARY}
404 405
  ${Boost_LIBRARIES}
  )
406

407 408 409
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  TARGET_LINK_LIBRARIES(vite
  rt
410
  )
411 412
  ADD_DEFINITIONS("-DBOOST_GZIP")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") 
413

414 415 416 417 418 419
IF(VITE_ENABLE_VBO)
  TARGET_LINK_LIBRARIES(vite
    ${GLEW_LIBRARY}
    )
ENDIF(VITE_ENABLE_VBO)

420 421 422 423 424 425
IF(VITE_ENABLE_OTF)
  TARGET_LINK_LIBRARIES(vite
    ${OTF_LIBRARY}
    )
ENDIF(VITE_ENABLE_OTF)

426 427 428 429 430 431
IF(VITE_ENABLE_TAU)
  TARGET_LINK_LIBRARIES(vite
    ${TAU_LIBRARY}
    )
ENDIF(VITE_ENABLE_TAU)

432
INSTALL_TARGETS(/bin vite)