File: CMakeLists.txt

package info (click to toggle)
viva 1.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,440 kB
  • sloc: cpp: 2,992; ansic: 1,578; makefile: 37
file content (159 lines) | stat: -rw-r--r-- 4,567 bytes parent folder | download | duplicates (2)
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
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
88
89
90
91
92
93
94
95
96
97
98
99
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
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
155
156
157
158
159
# This file is part of Viva
#
# Viva is free software: you can redistribute it and/or modify it
# under the terms of the GNU Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Viva is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Public License for more details.
#
# You should have received a copy of the GNU Public License
# along with Viva. If not, see <http://www.gnu.org/licenses/>.
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
PROJECT(viva)
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

#
# The Tupi Library written in C (particle system)
SET(LIBTUPI_HEADERS
  src/libtupi/tupi.h)
SET(LIBTUPI_SOURCES
  src/libtupi/bary.c
  src/libtupi/basic.c
  src/libtupi/dynar.c
  src/libtupi/dict.c
  src/libtupi/particle.c
  src/libtupi/box.c
  src/libtupi/cell.c
  src/libtupi/layout.c
  src/libtupi/node.c)
#
# Viva Sources
SET(VIVA_HEADERS
  src/viva/VivaWindow.h
  src/viva/VivaGraphView.h
  src/viva/VivaApplication.h
  src/viva/VivaLayoutRunner.h
  src/viva/VivaGraph.h
  src/viva/VivaRenderingThread.h)
SET(VIVA_SOURCES
  src/viva/main.cc
  src/viva/VivaWindow.cc
  src/viva/VivaGraphView.cc
  src/viva/VivaApplication.cc
  src/viva/VivaLayoutRunner.cc
  src/viva/VivaGraph.cc
  src/viva/VivaNode.cc
  src/viva/VivaRenderingThread.cc)
SET(VIVA_RESOURCES
  src/viva/VivaResource.qrc)

#
# Treemap sources
SET(TREEMAP_HEADERS
  src/vv_treemap/VTApplication.h
  src/vv_treemap/VTFrame.h
  src/vv_treemap/VTWindow.h
  src/vv_treemap/VTWidget.h)
SET(TREEMAP_SOURCES
  src/vv_treemap/main.cc
  src/vv_treemap/VTApplication.cc
  src/vv_treemap/VTFrame.cc
  src/vv_treemap/VTWindow.cc
  src/vv_treemap/VTWidget.cc
  src/vv_treemap/VTWidget+Paje.cc
  src/vv_treemap/VTWidget+Treemap.cc
  src/vv_treemap/PajeTreemap.cc)

#
# Utils (Qt-based) sources
SET(UTILS_HEADERS
  src/utils/PajeThreadReader.h
  src/utils/VTSFrame.h
  src/utils/VTSWindow.h
  src/utils/QPajeTypeModel.h
  src/utils/QPajeTypeFilter.h)
SET(UTILS_SOURCES
  src/utils/PajeThreadReader.cc
  src/utils/VTSFrame.cc
  src/utils/VTSWindow.cc
  src/utils/QPajeTypeModel.cc
  src/utils/QPajeTypeFilter.cc)

# the cmake options
OPTION(VIVA         "The Viva visualization tool (Qt4 version)" ON)
OPTION(VV_TREEMAP      "The vv_treemap visualization tool" ON)
OPTION(VIVA_DOC "Generate viva documentation" OFF)

FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtOpenGl)
FIND_PACKAGE(GLUT REQUIRED)
FIND_PACKAGE(OpenGL REQUIRED)
FIND_PACKAGE(LibConfig REQUIRED)
FIND_PACKAGE(PajeNG REQUIRED)

#
# Utils
#
QT4_WRAP_CPP(UTILS_HEADERS_MOC ${UTILS_HEADERS})

#
# VIVA
#
IF(VIVA)
  QT4_WRAP_CPP(VIVA_HEADERS_MOC ${VIVA_HEADERS})
  QT4_ADD_RESOURCES(VIVA_RESOURCES_RCC ${VIVA_RESOURCES})
  INCLUDE(${QT_USE_FILE})
  ADD_DEFINITIONS(${QT_DEFINITIONS})
  INCLUDE_DIRECTORIES(viva ${PROJECT_SOURCE_DIR}/src/libtupi/)
  INCLUDE_DIRECTORIES(viva src/utils/)
  INCLUDE_DIRECTORIES(viva ${PAJENG_INCLUDE_PATH})
  LINK_DIRECTORIES (${PAJENG_LIBRARY_PATH})

  ADD_EXECUTABLE(viva
    ${LIBTUPI_SOURCES}
    ${VIVA_SOURCES}
    ${VIVA_HEADERS_MOC}
    ${VIVA_RESOURCES_RCC}
    ${UTILS_SOURCES}
    ${UTILS_HEADERS_MOC})
  TARGET_LINK_LIBRARIES(viva ${QT_LIBRARIES})
  TARGET_LINK_LIBRARIES(viva ${GLUT_glut_LIBRARY})
  TARGET_LINK_LIBRARIES(viva ${OPENGL_gl_LIBRARY})
  TARGET_LINK_LIBRARIES(viva ${OPENGL_glu_LIBRARY})
  TARGET_LINK_LIBRARIES(viva ${LIBCONFIG_LIBRARIES})
  TARGET_LINK_LIBRARIES(viva paje)
  INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/viva DESTINATION bin)
ENDIF(VIVA)

#
# TREEMAP
#
IF(VV_TREEMAP)
  QT4_WRAP_CPP(TREEMAP_HEADERS_MOC ${TREEMAP_HEADERS})
  QT4_ADD_RESOURCES(TREEMAP_RESOURCES_RCC ${TREEMAP_RESOURCES})
  INCLUDE(${QT_USE_FILE})
  ADD_DEFINITIONS(${QT_DEFINITIONS})
  INCLUDE_DIRECTORIES(vv_treemap ${PAJENG_INCLUDE_PATH})
  INCLUDE_DIRECTORIES(vv_treemap src/utils/)
  LINK_DIRECTORIES (${PAJENG_LIBRARY_PATH})

  ADD_EXECUTABLE(vv_treemap
    ${TREEMAP_SOURCES}
    ${TREEMAP_HEADERS_MOC}
    ${TREEMAP_RESOURCES_RCC}
    ${UTILS_SOURCES}
    ${UTILS_HEADERS_MOC})
  TARGET_LINK_LIBRARIES(vv_treemap ${QT_LIBRARIES})
  TARGET_LINK_LIBRARIES(vv_treemap ${GLUT_glut_LIBRARY})
  TARGET_LINK_LIBRARIES(vv_treemap ${OPENGL_gl_LIBRARY})
  TARGET_LINK_LIBRARIES(vv_treemap ${OPENGL_glu_LIBRARY})
  TARGET_LINK_LIBRARIES(vv_treemap paje)
  INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vv_treemap DESTINATION bin)  
ENDIF(VV_TREEMAP)

if(VIVA_DOC)
  add_subdirectory(doc)
endif(VIVA_DOC)