CMakeLists.txt 6.42 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 49
#
# 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
  common/info.hpp
50
  common/Session.hpp
51 52
  common/trace.h
  common/Memory.hpp
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
  # 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
  # Render headers
Olivier Lagrasse's avatar
Olivier Lagrasse committed
86
  render/Render.hpp
87
  render/Geometry.hpp
88
  render/Hook_event.hpp
89
  render/Render_opengl.hpp
90
  render/Render_alternate.hpp
Olivier Lagrasse's avatar
Olivier Lagrasse committed
91
  render/Render_svg.hpp
92 93 94
  render/render_stats.hpp
  render/render_stats_opengl.hpp
  render/render_stats_svg.hpp
95
  render/Ruler.hpp
96 97 98 99
  #render/vbo.hpp
  # Interface headers
  interface/resource.hpp
  interface/parsing_thread.hpp
100 101 102 103
  interface/Interface.hpp
  interface/Interface_graphic.hpp
  # Core header
  core/Core.hpp
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
  # Parser headers
  parser/Definition.hpp
  parser/Line.hpp
  parser/Parser.hpp
  parser/ParserDefinitionPaje.hpp
  parser/ParserEventPaje.hpp
  parser/ParserPaje.hpp
  parser/ParserVite.hpp
  parser/File.hpp
  # Statistics headers
  statistics/Stats_window.hpp
  statistics/Statistic.hpp
  statistics/DrawStats.hpp
  statistics/DrawVDiagram.hpp
  statistics/DrawHDiagram.hpp
  statistics/DrawCounter.hpp
120 121
  # Plugin header
  plugin/Command_window.hpp
122 123 124 125 126 127 128
)

SET(VITE_UIS
  interface/info_window.ui
  interface/main_window.ui
  interface/option_export_window.ui
  interface/stats_viewer.ui
129
  interface/global_cmd.ui
Mathieu Faverge's avatar
Mathieu Faverge committed
130
  interface/list_of_counter_to_export.ui
131 132 133 134 135 136 137 138
)

SET(VITE_SRCS
  # Messages & Errors 
  common/Message.cpp
  common/Errors.cpp
  common/Tools.cpp
  common/info.cpp
139
  common/Session.cpp
140
  common/Memory.cpp
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
  # 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
  # Render code files
166
  render/Geometry.cpp
167
  render/Hook_event.cpp
Olivier Lagrasse's avatar
Olivier Lagrasse committed
168
  render/Render.hpp
169
  render/Render_opengl.cpp
170
  render/Render_alternate.cpp
Olivier Lagrasse's avatar
Olivier Lagrasse committed
171
  render/Render_svg.cpp
172 173
  render/render_stats_opengl.cpp
  render/render_stats_svg.cpp
174
  render/Ruler.cpp
175 176 177 178 179 180 181 182 183 184 185 186 187 188
  #render/vbo.cpp
  # Parser code files
  parser/Definition.cpp
  parser/Line.cpp
  parser/File.cpp
  parser/ParserDefinitionPaje.cpp
  parser/ParserEventPaje.cpp
  parser/ParserPaje.cpp
  parser/ParserVite.cpp
  # Statistics code files
  statistics/Statistic.cpp
  statistics/Stats_window.cpp
  # Interface code files
  interface/parsing_thread.cpp
189
  interface/Interface_graphic.cpp
190 191
  # Plugin code file
  plugin/Command_window.cpp
192 193
  # Core code files
  core/Core.cpp
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
  # Main
  main.cpp
  )

SET(VITE_RCCS
  interface/vite.qrc
  )


IF(VITE_ENABLE_OTF)
  ADD_DEFINITIONS(-DWITH_OTF)

  SET(VITE_HDRS
    ${VITE_HDRS}
    parser/ParserDefinitionOTF.hpp
    parser/ParserEventOTF.hpp
    parser/ParserOTF.hpp
    )

  SET(VITE_SRCS
    ${VITE_SRCS}
    parser/ParserDefinitionOTF.cpp
    parser/ParserEventOTF.cpp
    parser/ParserOTF.cpp
    )

  INCLUDE_DIRECTORIES(${OTF_INCLUDE_DIR})

ENDIF(VITE_ENABLE_OTF)

224
# ADD_DEFINITIONS(-DMEMORY_USAGE -DMEMORY_TRACE)
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249

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)

INCLUDE_DIRECTORIES(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
)

ADD_EXECUTABLE(vite ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS})
TARGET_LINK_LIBRARIES(vite
  ${QT_LIBRARIES}
Olivier Lagrasse's avatar
Olivier Lagrasse committed
250
#  ${GLUT_LIBRARIES}
251 252 253 254 255 256 257 258 259
  )

IF(VITE_ENABLE_OTF)
  TARGET_LINK_LIBRARIES(vite
    ${OTF_LIBRARY}
    )
ENDIF(VITE_ENABLE_OTF)

INSTALL_TARGETS(/bin vite)