d135dc04fcc964bd635c95020f575424dcf70eff
1 SET(INKSCAPE_SRC)\r
2 \r
3 # A macro to replace slashes and spaces in a string with underscores\r
4 MACRO(SANITIZE_PATH _string_var)\r
5 STRING(REGEX REPLACE "[\\/ ]+" "_" ${_string_var} ${${_string_var}})\r
6 ENDMACRO(SANITIZE_PATH _string_var)\r
7 \r
8 # A macro to prepend a given string onto the beginning of each string in a list\r
9 MACRO(PREPEND _list _str)\r
10 SET(_temp_list ${${_list}})\r
11 SET(${_list})\r
12 FOREACH(x ${_temp_list})\r
13 SET(${_list} ${${_list}} ${_str}${x})\r
14 ENDFOREACH(x)\r
15 ENDMACRO(PREPEND _list _str)\r
16 \r
17 # All folder with CMakeLists.txt files (excluding internal libraries)\r
18 SET(srcfolders\r
19 algorithms\r
20 api\r
21 bind\r
22 debug\r
23 display\r
24 dom\r
25 dom/io\r
26 dom/odf\r
27 dom/util\r
28 #dom/work\r
29 extension\r
30 #extension/dxf2svg\r
31 extension/implementation\r
32 extension/internal\r
33 extension/param\r
34 graphlayout\r
35 helper\r
36 inkjar\r
37 io\r
38 jabber_whiteboard\r
39 jabber_whiteboard/dialog\r
40 live_effects\r
41 live_effects/parameter\r
42 #pedro\r
43 removeoverlap\r
44 svg\r
45 trace\r
46 trace/potrace\r
47 traits\r
48 ui/cache\r
49 ui\r
50 ui/dialog\r
51 ui/view\r
52 ui/widget\r
53 #utest\r
54 util\r
55 widgets\r
56 xml\r
57 )\r
58 \r
59 # 1) include each list file\r
60 # 2) grab the variable inside \r
61 # 3) prepend the full relative path to each file in list\r
62 # 4) append the list to INKSCAPE_SRC\r
63 FOREACH(dirlist ${srcfolders})\r
64 SET(_temp_dirlist "${dirlist}")\r
65 MESSAGE(STATUS "Processing ${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt")\r
66 INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt)\r
67 SANITIZE_PATH(dirlist)\r
68 PREPEND(${dirlist}_SRC "${_temp_dirlist}/")\r
69 SET(INKSCAPE_SRC ${INKSCAPE_SRC} ${${dirlist}_SRC})\r
70 ENDFOREACH(dirlist)\r
71 \r
72 \r
73 # All directories containing lists files that describe building internal libraries\r
74 SET(libfolders
75 2geom\r
76 application\r
77 dialogs\r
78 libavoid\r
79 libcola\r
80 libcroco\r
81 libgdl\r
82 libnr\r
83 libnrtype\r
84 libvpsc\r
85 )\r
86 \r
87 FOREACH(dirlist ${libfolders})\r
88 ADD_SUBDIRECTORY(${dirlist})\r
89 ENDFOREACH(dirlist)\r
90 \r
91 IF(WIN32)\r
92 SET(ONLY_WIN\r
93 registrytool.cpp\r
94 #deptool.cpp\r
95 )\r
96 ELSEIF(WIN32)\r
97 SET(ONLY_WIN)\r
98 ENDIF(WIN32)\r
99 \r
100 SET(INKSCAPE_SRC\r
101 ${INKSCAPE_SRC}\r
102 arc-context.cpp\r
103 attributes.cpp\r
104 axis-manip.cpp\r
105 box3d-context.cpp\r
106 box3d.cpp\r
107 box3d-side.cpp\r
108 color.cpp\r
109 color-profile.cpp\r
110 composite-undo-stack-observer.cpp\r
111 conditions.cpp\r
112 conn-avoid-ref.cpp\r
113 connector-context.cpp\r
114 console-output-undo-observer.cpp\r
115 context-fns.cpp\r
116 desktop-affine.cpp\r
117 desktop.cpp\r
118 desktop-events.cpp\r
119 desktop-handles.cpp\r
120 desktop-style.cpp\r
121 dir-util.cpp\r
122 document.cpp\r
123 document-subset.cpp\r
124 document-undo.cpp\r
125 doxygen-main.cpp\r
126 draw-anchor.cpp\r
127 draw-context.cpp\r
128 dropper-context.cpp\r
129 dyna-draw-context.cpp\r
130 ege-adjustment-action.cpp\r
131 ege-color-prof-tracker.cpp\r
132 ege-output-action.cpp\r
133 ege-select-one-action.cpp\r
134 event-context.cpp\r
135 event-log.cpp\r
136 extract-uri.cpp\r
137 file.cpp\r
138 filter-chemistry.cpp\r
139 filter-enums.cpp\r
140 fixes.cpp\r
141 flood-context.cpp\r
142 fontsize-expansion.cpp\r
143 gc-anchored.cpp\r
144 gc.cpp\r
145 gc-finalized.cpp\r
146 gradient-chemistry.cpp\r
147 gradient-context.cpp\r
148 gradient-drag.cpp\r
149 guide-snapper.cpp\r
150 help.cpp\r
151 ink-action.cpp\r
152 inkscape.cpp\r
153 inkscape-stock.cpp\r
154 ##inkview is another executable file\r
155 ##needs to be separated as a second target\r
156 #inkview.cpp\r
157 interface.cpp\r
158 knot.cpp\r
159 knotholder.cpp\r
160 layer-fns.cpp\r
161 layer-manager.cpp\r
162 line-geometry.cpp\r
163 line-snapper.cpp\r
164 main-cmdlineact.cpp\r
165 main.cpp\r
166 marker.cpp\r
167 media.cpp\r
168 message-context.cpp\r
169 message-stack.cpp\r
170 mod360.cpp\r
171 node-context.cpp\r
172 nodepath.cpp\r
173 object-edit.cpp\r
174 object-hierarchy.cpp\r
175 object-snapper.cpp\r
176 path-chemistry.cpp\r
177 pencil-context.cpp\r
178 pen-context.cpp\r
179 persp3d.cpp\r
180 persp3d-reference.cpp\r
181 perspective-line.cpp\r
182 preferences.cpp\r
183 prefix.cpp\r
184 prefs-utils.cpp\r
185 print.cpp\r
186 profile-manager.cpp\r
187 proj_pt.cpp\r
188 rect-context.cpp\r
189 rubberband.cpp\r
190 satisfied-guide-cns.cpp\r
191 selcue.cpp\r
192 select-context.cpp\r
193 selection-chemistry.cpp\r
194 selection.cpp\r
195 selection-describer.cpp\r
196 seltrans.cpp\r
197 seltrans-handles.cpp\r
198 shape-editor.cpp\r
199 shortcuts.cpp\r
200 snap.cpp\r
201 snapped-line.cpp\r
202 snapped-point.cpp\r
203 snapper.cpp\r
204 sp-anchor.cpp\r
205 sp-animation.cpp\r
206 sp-clippath.cpp\r
207 sp-conn-end.cpp\r
208 sp-conn-end-pair.cpp\r
209 sp-cursor.cpp\r
210 sp-defs.cpp\r
211 sp-ellipse.cpp\r
212 sp-feblend.cpp\r
213 sp-fecolormatrix.cpp\r
214 sp-fecomponenttransfer.cpp\r
215 sp-fecomposite.cpp\r
216 sp-feconvolvematrix.cpp\r
217 sp-fediffuselighting.cpp\r
218 sp-fedisplacementmap.cpp\r
219 sp-fedistantlight.cpp\r
220 sp-feflood.cpp\r
221 sp-feimage.cpp\r
222 sp-femerge.cpp\r
223 sp-femergenode.cpp\r
224 sp-femorphology.cpp\r
225 sp-feoffset.cpp\r
226 sp-fepointlight.cpp\r
227 sp-fespecularlighting.cpp\r
228 sp-fespotlight.cpp\r
229 sp-fetile.cpp\r
230 sp-feturbulence.cpp\r
231 sp-filter.cpp\r
232 sp-filter-primitive.cpp\r
233 sp-filter-reference.cpp\r
234 sp-flowdiv.cpp\r
235 sp-flowregion.cpp\r
236 sp-flowtext.cpp\r
237 sp-gaussian-blur.cpp\r
238 sp-gradient.cpp\r
239 sp-gradient-reference.cpp\r
240 sp-guide.cpp\r
241 sp-image.cpp\r
242 spiral-context.cpp\r
243 sp-item.cpp\r
244 sp-item-group.cpp\r
245 sp-item-notify-moveto.cpp\r
246 sp-item-rm-unsatisfied-cns.cpp\r
247 sp-item-transform.cpp\r
248 sp-item-update-cns.cpp\r
249 sp-line.cpp\r
250 splivarot.cpp\r
251 sp-mask.cpp\r
252 sp-metadata.cpp\r
253 sp-metrics.cpp\r
254 sp-namedview.cpp\r
255 sp-object.cpp\r
256 sp-object-group.cpp\r
257 sp-object-repr.cpp\r
258 sp-offset.cpp\r
259 sp-paint-server.cpp\r
260 sp-path.cpp\r
261 sp-pattern.cpp\r
262 sp-polygon.cpp\r
263 sp-polyline.cpp\r
264 sp-rect.cpp\r
265 sp-root.cpp\r
266 sp-shape.cpp\r
267 sp-skeleton.cpp\r
268 sp-spiral.cpp\r
269 sp-star.cpp\r
270 sp-string.cpp\r
271 sp-style-elem.cpp\r
272 sp-switch.cpp\r
273 sp-symbol.cpp\r
274 sp-text.cpp\r
275 sp-tref.cpp\r
276 sp-tref-reference.cpp\r
277 sp-tspan.cpp\r
278 sp-use.cpp\r
279 sp-use-reference.cpp\r
280 star-context.cpp\r
281 streams-gzip.cpp\r
282 streams-handles.cpp\r
283 streams-jar.cpp\r
284 streams-zlib.cpp\r
285 style.cpp\r
286 #style-test.cpp\r
287 svg-view.cpp\r
288 svg-view-widget.cpp\r
289 text-chemistry.cpp\r
290 text-context.cpp\r
291 text-editing.cpp\r
292 tools-switch.cpp\r
293 transf_mat_3x4.cpp\r
294 tweak-context.cpp\r
295 uri.cpp\r
296 uri-references.cpp\r
297 vanishing-point.cpp\r
298 verbs.cpp\r
299 version.cpp\r
300 winmain.cpp\r
301 zoom-context.cpp\r
302 ${ONLY_WIN}\r
303 )\r
304 \r
305 # make executable for INKSCAPE\r
306 ADD_EXECUTABLE(inkscape ${INKSCAPE_SRC})\r
307 TARGET_LINK_LIBRARIES(inkscape\r
308 "${INKSCAPE_LINK_FLAGS}" 2geom avoid cola croco gdl nr nrtype vpsc\r
309 )\r
310 #INSTALL(TARGETS INKSCAPE\r
311 # RUNTIME DESTINATION bin\r
312 # LIBRARY DESTINATION lib\r
313 # ARCHIVE DESTINATION lib\r
314 #)\r
315 \r
316 #FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.h")\r
317 #INSTALL(FILES ${files} DESTINATION include/INKSCAPE/INKSCAPE)\r
318 \r
319 #CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/INKSCAPE.pc.in\r
320 # ${CMAKE_BINARY_DIR}/INKSCAPE.pc @ONLY IMMEDIATE )\r
321 #INSTALL(FILES "${CMAKE_BINARY_DIR}/INKSCAPE.pc" DESTINATION lib/pkgconfig)\r