-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
executable file
·216 lines (204 loc) · 4.08 KB
/
CMakeLists.txt
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
set(HEADERS
bah.hpp
blockvectors.hpp
bvh.hpp
cloth.hpp
collision.hpp
collisionutil.hpp
conf.hpp
constraint.hpp
dde.hpp
display.hpp
displayplay.hpp
displayphysics.hpp
displayreplay.hpp
displaytesting.hpp
dynamicremesh.hpp
geometry.hpp
handle.hpp
io.hpp
magic.hpp
mesh.hpp
misc.hpp
morph.hpp
mot_parser.hpp
nearobs.hpp
obstacle.hpp
opengl.hpp
optimization.hpp
physics.hpp
plasticity.hpp
popfilter.hpp
proximity.hpp
remesh.hpp
runphysics.hpp
separate.hpp
separateobs.hpp
simulation.hpp
sparse.hpp
spline.hpp
sparse_solver.hpp
strainlimiting.hpp
# taucs.hpp
tensormax.hpp
timer.hpp
transformation.hpp
util.hpp
vectors.hpp
winport.hpp
tensor.h
smpl.h
)
set(SOURCES
auglag.cpp
bah.cpp
bvh.cpp
cloth.cpp
collision.cpp
collisionutil.cpp
conf.cpp
constraint.cpp
dde.cpp
display.cpp
displayplay.cpp
displayphysics.cpp
displayreplay.cpp
displaytesting.cpp
dynamicremesh.cpp
geometry.cpp
handle.cpp
io.cpp
lbfgs.cpp
lsnewton.cpp
magic.cpp
main.cpp
mesh.cpp
misc.cpp
morph.cpp
mot_parser.cpp
nearobs.cpp
nlcg.cpp
obstacle.cpp
physics.cpp
plasticity.cpp
popfilter.cpp
proximity.cpp
remesh.cpp
runphysics.cpp
separate.cpp
separateobs.cpp
simulation.cpp
sparse_solver.cpp
spline.cpp
strainlimiting.cpp
# taucs.cpp
tensormax.cpp
timer.cpp
transformation.cpp
trustregion.cpp
util.cpp
vectors.cpp
smpl.cpp
tensor.cpp
)
#HYLC sources
file(GLOB_RECURSE HYLC_SRCS hylc/*.cpp)
file(GLOB_RECURSE HYLC_HDRS hylc/*.hpp hylc/*.h)
# Boost library.
set(Boost_USE_STATIC_LIBS ON) # Use static libs.
add_definitions(-DBOOST_ALL_NO_LIB) # Disable auto-linking in MSVC.
find_package(Boost 1.55.0 QUIET REQUIRED COMPONENTS system filesystem)
if (NOT WIN32)
# png library.
find_package(PNG QUIET REQUIRED)
# zlib library.
find_package(ZLIB QUIET REQUIRED)
# GLUT library.
find_package(GLUT QUIET REQUIRED)
endif()
# OpenGL library.
find_package(OpenGL QUIET REQUIRED)
# OpenCV library
find_package(OpenCV REQUIRED)
# Set include directories.
if (WIN32)
include_directories( SYSTEM # system to avoid warnings in libraries
../dependencies/alglib/cpp/src
../dependencies/jsoncpp/include
# ../dependencies/fitpackpp/fitpackpp
../dependencies/eigen
../dependencies/freeglut/include
../dependencies/zlib
${Boost_INCLUDE_DIRS}
${OPENGL_INCLUDE_DIR}
${OpenCV_INCLUDE_DIRS}
)
else(WIN32)
include_directories( SYSTEM # system to avoid warnings in libraries
../dependencies/alglib/cpp/src
../dependencies/jsoncpp/include
# ../dependencies/fitpackpp/fitpackpp
../dependencies/eigen
${Boost_INCLUDE_DIRS}
${OPENGL_INCLUDE_DIR}
${GLUT_INCLUDE_DIR}
${ZLIB_INCLUDE_DIRS}
${PNG_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
endif(WIN32)
# Disable stupid MSVC compiler warnings.
if (WIN32)
add_definitions(-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS)
endif()
# Set freeglut to be linked statically.
if (WIN32)
add_definitions(-DFREEGLUT_STATIC)
set(CMAKE_DEBUG_POSTFIX "d")
endif(WIN32)
add_executable(arcsim_0.2.1
${HEADERS}
${HYLC_HDRS}
${SOURCES}
${HYLC_SRCS}
)
if (WIN32)
# arcsim has the following dependencies.
add_dependencies(arcsim_0.2.1
alglib
json
# fitpackpp
freeglut_static
zlibstatic
)
# Set link libraries.
target_link_libraries(arcsim_0.2.1
alglib
json
# fitpackpp
freeglut_static
zlibstatic
${Boost_LIBRARIES}
${OPENGL_LIBRARIES}
${OpenCV_LIBRARIES}
)
else(WIN32)
# arcsim has the following dependencies.
add_dependencies(arcsim_0.2.1
alglib
json
# fitpackpp
)
# Set link libraries.
target_link_libraries(arcsim_0.2.1
alglib
json
# fitpackpp
${Boost_LIBRARIES}
${OPENGL_LIBRARIES}
${GLUT_LIBRARIES}
${ZLIB_LIBRARIES}
${PNG_LIBRARIES}
${OpenCV_LIBRARIES}
)
endif(WIN32)