CMakeLists.txt 7.25 KB
Newer Older
1
2
3
4
5
# TODO properly define the path to the XML Schema at run time (in MonitoringManager and MonitoringManagerFactory)
# otherwise this generates an error when executing the application on a machine that have no or a different
# source dir path!
#add_definitions(-DMONITORIN_XSD="${CMAKE_CURRENT_SOURCE_DIR}/../schema/MonitorIn.xsd")
#add_definitions(-DMONITOROUT_XSD="${CMAKE_CURRENT_SOURCE_DIR}/../schema/MonitorOut.xsd")
6

7
8
9
10
# +-------------------------------------------------------+
# |  EXTERNAL SIMULATOR SUPPORT : SOFA, ANSYS, ARTISYNTH  |
# +-------------------------------------------------------+
include(ExternalSimulatorSupport.cmake)
11

12
13
14
# +---------------+
# |  GUI SUPPORT  |
# +---------------+
15
if(MML_GENERATE_GUI)
16
17
18
19
    add_definitions(-DMML_GENERATE_GUI)
    set(MML_GUI_MOC_SRCS SimulatorWidget.h          
                         Xmlhighlighter.h
    )
20
    # qt4_wrap_cpp(MML_GUI_MOCS ${MML_GUI_MOC_SRCS}) Not needed if AUTOMOC is set to ON (CMake therefore handle moc automatically)
21
22
23
24
    set(MML_GUI_HEADERS ${MML_GUI_MOC_SRCS})
    set(MML_GUI_SRC ${MML_GUI_MOCS}
                    SimulatorWidget.cpp    
                    Xmlhighlighter.cpp
25
26
27
    )
endif(MML_GENERATE_GUI)

28
29
30
# +-----------------------+
# |  SOURCES AND HEADERS  |
# +-----------------------+
31
32
33
34
35
36
37
38
39
40
41
42
set(monitoring_H        MMLAPI.h
                        StoppingCriterion.h
                        StoppingCriterionFactory.h
                        Criterion.h
                        CriterionFactory.h
                        MultipleCriterion.h
                        MultipleCriterionFactory.h
                        Method.h
                        MethodFactory.h
                        Force.h 
                        KineticEnergy.h
                        Position.h
43
                        TimeMonitoring.h
44
45
46
47
48
                        Velocity.h
                        AndMultipleCriterion.h
                        OrMultipleCriterion.h
                        MinThreshold.h
                        Threshold.h
49
                        TimePeriodThreshold.h
50
51
52
53
54
55
56
57
                        Simulator.h
                        NonInteractiveSimulator.h
                        InteractiveSimulator.h
                        SimulatorFactory.h
                        InitSimulators.h
                        ${MML_SOFA_HEADERS}
                        ${MML_ANSYS_HEADERS}
                        ${MML_ARTISYNTH_HEADERS}
58
                        ${MML_GUI_HEADERS}       
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
                        Monitor.h 
                        MonitorFactory.h
                        MonitorGeometricDeviation.h
                        MonitorPosition.h
                        MonitorRen.h
                        MonitorForce.h
                        MonitorPointSetDistance.h
                        MonitorPointFinalSetDistance.h
                        MonitorVolume.h
                        MonitorSurface.h
                        MonitorDisplacement.h
                        MonitorNormDisplacement.h
                        MonitorPointToTriangleMeshDistanceFinal.h
                        MonitorDistanceX.h
                        MonitorDistanceY.h
                        MonitorDistanceZ.h
                        MonitorComputingTime.h
                        Reference.h
                        Chrono.h
                        Tools.h
                        Macros.h
                        AtomIterator.h
                        Facet.h
                        SurfaceExtractor.h
                        MonitoringManager.h
                        MonitoringManagerFactory.h
                        InteractiveMonitoringManager.h
                        NonInteractiveMonitoringManager.h
87
88
)

89
90
91
92
93
94
95
96
97
98
99
100
set(monitoring_SRCS     ${monitoring_H}
                        StoppingCriterion.cpp
                        StoppingCriterionFactory.cpp
                        Criterion.cpp
                        CriterionFactory.cpp
                        MultipleCriterion.cpp
                        MultipleCriterionFactory.cpp
                        Method.cpp
                        MethodFactory.cpp
                        Force.cpp 
                        KineticEnergy.cpp
                        Position.cpp
101
                        TimeMonitoring.cpp
102
103
104
105
106
                        Velocity.cpp
                        AndMultipleCriterion.cpp
                        OrMultipleCriterion.cpp
                        MinThreshold.cpp
                        Threshold.cpp
107
                        TimePeriodThreshold.cpp
108
109
110
111
112
113
114
                        Simulator.cpp
                        NonInteractiveSimulator.cpp
                        InteractiveSimulator.cpp
                        SimulatorFactory.cpp
                        ${MML_SOFA_SRC}
                        ${MML_ANSYS_SRC}
                        ${MML_ARTISYNTH_SRC}
115
                        ${MML_GUI_SRC}
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
                        Monitor.cpp
                        MonitorFactory.cpp
                        MonitorGeometricDeviation.cpp
                        MonitorPosition.cpp
                        MonitorRen.cpp
                        MonitorForce.cpp
                        MonitorPointSetDistance.cpp
                        MonitorPointFinalSetDistance.cpp
                        MonitorVolume.cpp
                        MonitorSurface.cpp
                        MonitorDisplacement.cpp
                        MonitorNormDisplacement.cpp
                        MonitorDistanceX.cpp
                        MonitorDistanceY.cpp
                        MonitorDistanceZ.cpp
                        MonitorComputingTime.cpp
                        MonitorPointToTriangleMeshDistanceFinal.cpp
                        Reference.cpp
                        Chrono.cpp
                        Tools.cpp
                        AtomIterator.cpp
                        Facet.cpp
                        SurfaceExtractor.cpp
                        MonitoringManager.cpp
                        MonitoringManagerFactory.cpp
                        InteractiveMonitoringManager.cpp
                        NonInteractiveMonitoringManager.cpp
143
144
)

145
# Add all the include directories
146
147
set(monitoring_INCLUDE_DIRECTORIES  ${MMLSCHEMA_INCLUDE_DIR}
                           ${MML_GUI_INCLUDE_DIR} 
148
149
150
151
                           ${SOFA_INCLUDE_DIR}
                           ${MML_ANSYS_WORKING_DIR}
                           ${MML_ARTISYNTH_WORKING_DIR}
)
152
       
153
# add monitoring as a camitk library
154
155
camitk_library( SHARED
                SOURCES ${monitoring_SRCS}
156
                DEFINES COMPILE_MML_TOOL
157
158
                NEEDS_QT_MODULES
                NEEDS_XERCESC
159
                NEEDS_CEP_LIBRARIES mmlschema pml pmlschema lml lmlschema
160
                PUBLIC #install directly in lib (or bin for Windows).
saubatn's avatar
saubatn committed
161
                NEEDS_XSD
162
                INCLUDE_DIRECTORIES ${monitoring_INCLUDE_DIRECTORIES}
163
                LINK_DIRECTORIES ${SOFA_LIB_DIR}
164
                # Caution: probably need here for Ansys and Artisynth library something like - LINK_DIRECTORIES ${MML_ANSYS_WORKING_DIR}/lib ${MML_ARTISYNTH_WORKING_DIR}/lib
165
                EXTERNAL_LIBRARIES ${SOFA_LIBS}
166
                CEP_NAME CEP_MODELING
167
                HEADERS_TO_INSTALL ${monitoring_H}
168
                DESCRIPTION "Tools to monitor a biomechanical deformation."
mat's avatar
mat committed
169
)
170

171
set_target_properties(${LIBRARY_TARGET_NAME} PROPERTIES ${${LIBRARY_TARGET_NAME}_LIBRARY_PROPERTIES} LINK_INTERFACE_LIBRARIES "")