Code

Cmake: Fixed issues with pedro not linking correctly
[inkscape.git] / src / CMakeLists.txt
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
23 dialogs\r
24 display\r
25 dom\r
26 dom/io\r
27 dom/odf\r
28 dom/util\r
29 #dom/work\r
30 extension\r
31 #extension/dxf2svg\r
32 extension/implementation\r
33 extension/internal\r
34 extension/param\r
35 graphlayout\r
36 helper\r
37 inkjar\r
38 io\r
39 jabber_whiteboard\r
40 jabber_whiteboard/dialog\r
41 live_effects\r
42 live_effects/parameter\r
43 pedro\r
44 removeoverlap\r
45 svg\r
46 trace\r
47 trace/potrace\r
48 traits\r
49 ui/cache\r
50 ui\r
51 ui/dialog\r
52 ui/view\r
53 ui/widget\r
54 #utest\r
55 util\r
56 widgets\r
57 xml\r
58 )\r
59 \r
60 # 1) include each list file\r
61 # 2) grab the variable inside \r
62 # 3) prepend the full relative path to each file in list\r
63 # 4) append the list to INKSCAPE_SRC\r
64 FOREACH(dirlist ${srcfolders})\r
65   SET(_temp_dirlist "${dirlist}")\r
66   MESSAGE(STATUS "Processing ${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt")\r
67   INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt)\r
68   SANITIZE_PATH(dirlist)\r
69   PREPEND(${dirlist}_SRC "${_temp_dirlist}/")\r
70   SET(INKSCAPE_SRC ${INKSCAPE_SRC} ${${dirlist}_SRC})\r
71 ENDFOREACH(dirlist)\r
72 \r
73 \r
74 # All directories containing lists files that describe building internal libraries\r
75 SET(libfolders
76 2geom\r
77 application\r
78 #dialogs\r
79 libavoid\r
80 libcola\r
81 libcroco\r
82 libgdl\r
83 libnr\r
84 libnrtype\r
85 libvpsc
86 livarot\r
87 )\r
88 \r
89 FOREACH(dirlist ${libfolders})\r
90   ADD_SUBDIRECTORY(${dirlist})\r
91 ENDFOREACH(dirlist)\r
92 \r
93 IF(WIN32)\r
94 SET(ONLY_WIN\r
95 registrytool.cpp
96 registrytool.h\r
97 #deptool.cpp
98 winmain.cpp\r
99 )\r
100 ELSEIF(WIN32)\r
101 SET(ONLY_WIN)\r
102 ENDIF(WIN32)\r
103 \r
104 SET(INKSCAPE_SRC\r
105 ${INKSCAPE_SRC}\r
106 approx-equal.h
107 arc-context.cpp
108 arc-context.h
109 attributes.cpp
110 attributes.h
111 attributes-test.h
112 axis-manip.cpp
113 axis-manip.h
114 bad-uri-exception.h
115 box3d-context.cpp
116 box3d-context.h
117 box3d.cpp
118 box3d.h
119 box3d-side.cpp
120 box3d-side.h
121 brokenimage.xpm
122 color.cpp
123 color.h
124 color-profile.cpp
125 color-profile-fns.h
126 color-profile.h
127 color-profile-test.h
128 color-rgba.h
129 composite-undo-stack-observer.cpp
130 composite-undo-stack-observer.h
131 conditions.cpp
132 conditions.h
133 conn-avoid-ref.cpp
134 conn-avoid-ref.h
135 connection-pool.h
136 connector-context.cpp
137 connector-context.h
138 console-output-undo-observer.cpp
139 console-output-undo-observer.h
140 context-fns.cpp
141 context-fns.h
142 decimal-round.h
143 deptool.cpp
144 desktop-affine.cpp
145 desktop-affine.h
146 desktop.cpp
147 desktop-events.cpp
148 desktop-events.h
149 desktop.h
150 desktop-handles.cpp
151 desktop-handles.h
152 desktop-style.cpp
153 desktop-style.h
154 device-manager.cpp
155 device-manager.h
156 dir-util.cpp
157 dir-util.h
158 dir-util-test.h
159 document.cpp
160 document.h
161 document-private.h
162 document-subset.cpp
163 document-subset.h
164 document-undo.cpp
165 doxygen-main.cpp
166 draw-anchor.cpp
167 draw-anchor.h
168 draw-context.cpp
169 draw-context.h
170 dropper-context.cpp
171 dropper-context.h
172 dyna-draw-context.cpp
173 dyna-draw-context.h
174 ege-adjustment-action.cpp
175 ege-adjustment-action.h
176 ege-color-prof-tracker.cpp
177 ege-color-prof-tracker.h
178 ege-output-action.cpp
179 ege-output-action.h
180 ege-select-one-action.cpp
181 ege-select-one-action.h
182 enums.h
183 eraser-context.cpp
184 eraser-context.h
185 event-context.cpp
186 event-context.h
187 event.h
188 event-log.cpp
189 event-log.h
190 extension
191 extract-uri.cpp
192 extract-uri.h
193 extract-uri-test.h
194 file.cpp
195 file.h
196 fill-or-stroke.h
197 filter-chemistry.cpp
198 filter-chemistry.h
199 filter-enums.cpp
200 filter-enums.h
201 fixes.cpp
202 flood-context.cpp
203 flood-context.h
204 fontsize-expansion.cpp
205 fontsize-expansion.h
206 forward.h
207 gc-alloc.h
208 gc-anchored.cpp
209 gc-anchored.h
210 gc-core.h
211 gc.cpp
212 gc-finalized.cpp
213 gc-finalized.h
214 gc-managed.h
215 gc-soft-ptr.h
216 gradient-chemistry.cpp
217 gradient-chemistry.h
218 gradient-context.cpp
219 gradient-context.h
220 gradient-drag.cpp
221 gradient-drag.h
222 guide-snapper.cpp
223 guide-snapper.h
224 help.cpp
225 helper-fns.h
226 help.h
227 icon-size.h
228 ige-mac-menu.c
229 ige-mac-menu.h
230 ink-action.cpp
231 ink-action.h
232 inkscape.cpp
233 inkscape.h
234 inkscape-private.h
235 inkscape.rc
236 inkscape-stock.cpp
237 inkscape-stock.h
238 inkscape_version.h.mingw
239 inkview.cpp
240 inkview-manifest.xml
241 inkview.rc
242 interface.cpp
243 interface.h
244 isinf.h
245 isnan.h
246 isnormal.h
247 jabber_whiteboard
248 knot.cpp
249 knot-enums.h
250 knot.h
251 knotholder.cpp
252 knot-holder-entity.h
253 knotholder.h
254 layer-fns.cpp
255 layer-fns.h
256 layer-manager.cpp
257 layer-manager.h
258 line-geometry.cpp
259 line-geometry.h
260 line-snapper.cpp
261 line-snapper.h
262 macros.h
263 main-cmdlineact.cpp
264 main-cmdlineact.h
265 main.cpp
266 marker.cpp
267 marker.h
268 media.cpp
269 media.h
270 memeq.h
271 menus-skeleton.h
272 message-context.cpp
273 message-context.h
274 message.h
275 message-stack.cpp
276 message-stack.h
277 mod360.cpp
278 mod360.h
279 mod360-test.h
280 modifier-fns.h
281 MultiPrinter.h
282 node-context.cpp
283 node-context.h
284 nodepath.cpp
285 nodepath.h
286 number-opt-number.h
287 object-edit.cpp
288 object-edit.h
289 object-hierarchy.cpp
290 object-hierarchy.h
291 object-snapper.cpp
292 object-snapper.h
293 path-chemistry.cpp
294 path-chemistry.h
295 path-prefix.h
296 pencil-context.cpp
297 pencil-context.h
298 pen-context.cpp
299 pen-context.h
300 persp3d.cpp
301 persp3d.h
302 persp3d-reference.cpp
303 persp3d-reference.h
304 perspective-line.cpp
305 perspective-line.h
306 plugin.def
307 preferences.cpp
308 preferences.h
309 preferences-skeleton.h
310 prefix.cpp
311 prefix.h
312 prefs-utils.cpp
313 prefs-utils.h
314 print.cpp
315 print.h
316 profile-manager.cpp
317 profile-manager.h
318 proj_pt.cpp
319 proj_pt.h
320 PylogFormatter.h
321 rect-context.cpp
322 rect-context.h
323 remove-last.h
324 require-config.h
325 round.h
326 round-test.h
327 rubberband.cpp
328 rubberband.h
329 satisfied-guide-cns.cpp
330 satisfied-guide-cns.h
331 selcue.cpp
332 selcue.h
333 select-context.cpp
334 select-context.h
335 selection-chemistry.cpp
336 selection-chemistry.h
337 selection.cpp
338 selection-describer.cpp
339 selection-describer.h
340 selection.h
341 selfname.tpl
342 seltrans.cpp
343 seltrans.h
344 seltrans-handles.cpp
345 seltrans-handles.h
346 shape-editor.cpp
347 shape-editor.h
348 shortcuts.cpp
349 shortcuts.h
350 snap.cpp
351 snap.h
352 snapped-line.cpp
353 snapped-line.h
354 snapped-point.cpp
355 snapped-point.h
356 snapper.cpp
357 snapper.h
358 sp-anchor.cpp
359 sp-anchor.h
360 sp-animation.cpp
361 sp-animation.h
362 sp-clippath.cpp
363 sp-clippath.h
364 sp-conn-end.cpp
365 sp-conn-end.h
366 sp-conn-end-pair.cpp
367 sp-conn-end-pair.h
368 sp-cursor.cpp
369 sp-cursor.h
370 sp-defs.cpp
371 sp-defs.h
372 sp-ellipse.cpp
373 sp-ellipse.h
374 sp-feblend.cpp
375 sp-feblend-fns.h
376 sp-feblend.h
377 sp-fecolormatrix.cpp
378 sp-fecolormatrix-fns.h
379 sp-fecolormatrix.h
380 sp-fecomponenttransfer.cpp
381 sp-fecomponenttransfer-fns.h
382 sp-fecomponenttransfer-funcnode.cpp
383 sp-fecomponenttransfer-funcnode.h
384 sp-fecomponenttransfer.h
385 sp-fecomposite.cpp
386 sp-fecomposite-fns.h
387 sp-fecomposite.h
388 sp-feconvolvematrix.cpp
389 sp-feconvolvematrix-fns.h
390 sp-feconvolvematrix.h
391 sp-fediffuselighting.cpp
392 sp-fediffuselighting-fns.h
393 sp-fediffuselighting.h
394 sp-fedisplacementmap.cpp
395 sp-fedisplacementmap-fns.h
396 sp-fedisplacementmap.h
397 sp-fedistantlight.cpp
398 sp-fedistantlight.h
399 sp-feflood.cpp
400 sp-feflood-fns.h
401 sp-feflood.h
402 sp-feimage.cpp
403 sp-feimage-fns.h
404 sp-feimage.h
405 sp-femerge.cpp
406 sp-femerge-fns.h
407 sp-femerge.h
408 sp-femergenode.cpp
409 sp-femergenode.h
410 sp-femorphology.cpp
411 sp-femorphology-fns.h
412 sp-femorphology.h
413 sp-feoffset.cpp
414 sp-feoffset-fns.h
415 sp-feoffset.h
416 sp-fepointlight.cpp
417 sp-fepointlight.h
418 sp-fespecularlighting.cpp
419 sp-fespecularlighting-fns.h
420 sp-fespecularlighting.h
421 sp-fespotlight.cpp
422 sp-fespotlight.h
423 sp-fetile.cpp
424 sp-fetile-fns.h
425 sp-fetile.h
426 sp-feturbulence.cpp
427 sp-feturbulence-fns.h
428 sp-feturbulence.h
429 sp-filter.cpp
430 sp-filter-fns.h
431 sp-filter.h
432 sp-filter-primitive.cpp
433 sp-filter-primitive.h
434 sp-filter-reference.cpp
435 sp-filter-reference.h
436 sp-filter-units.h
437 sp-flowdiv.cpp
438 sp-flowdiv.h
439 sp-flowregion.cpp
440 sp-flowregion.h
441 sp-flowtext.cpp
442 sp-flowtext.h
443 sp-font.cpp
444 sp-font.h
445 sp-gaussian-blur.cpp
446 sp-gaussian-blur-fns.h
447 sp-gaussian-blur.h
448 sp-glyph.cpp
449 sp-glyph.h
450 sp-gradient.cpp
451 sp-gradient-fns.h
452 sp-gradient.h
453 sp-gradient-reference.cpp
454 sp-gradient-reference.h
455 sp-gradient-spread.h
456 sp-gradient-test.h
457 sp-gradient-units.h
458 sp-gradient-vector.h
459 sp-guide-attachment.h
460 sp-guide-constraint.h
461 sp-guide.cpp
462 sp-guide.h
463 sp-image.cpp
464 sp-image.h
465 spiral-context.cpp
466 spiral-context.h
467 sp-item.cpp
468 sp-item-group.cpp
469 sp-item-group.h
470 sp-item.h
471 sp-item-notify-moveto.cpp
472 sp-item-notify-moveto.h
473 sp-item-rm-unsatisfied-cns.cpp
474 sp-item-rm-unsatisfied-cns.h
475 sp-item-transform.cpp
476 sp-item-transform.h
477 sp-item-update-cns.cpp
478 sp-item-update-cns.h
479 sp-linear-gradient-fns.h
480 sp-linear-gradient.h
481 sp-line.cpp
482 sp-line.h
483 splivarot.cpp
484 splivarot.h
485 sp-lpe-item.cpp
486 sp-lpe-item.h
487 sp-marker-loc.h
488 sp-mask.cpp
489 sp-mask.h
490 sp-metadata.cpp
491 sp-metadata.h
492 sp-metric.h
493 sp-metrics.cpp
494 sp-metrics.h
495 sp-missing-glyph.cpp
496 sp-missing-glyph.h
497 sp-namedview.cpp
498 sp-namedview.h
499 sp-object.cpp
500 sp-object-group.cpp
501 sp-object-group.h
502 sp-object.h
503 sp-object-repr.cpp
504 sp-object-repr.h
505 sp-offset.cpp
506 sp-offset.h
507 sp-paint-server.cpp
508 sp-paint-server.h
509 sp-path.cpp
510 sp-path.h
511 sp-pattern.cpp
512 sp-pattern.h
513 sp-polygon.cpp
514 sp-polygon.h
515 sp-polyline.cpp
516 sp-polyline.h
517 sp-radial-gradient-fns.h
518 sp-radial-gradient.h
519 sp-rect.cpp
520 sp-rect.h
521 sp-root.cpp
522 sp-root.h
523 sp-shape.cpp
524 sp-shape.h
525 sp-skeleton.cpp
526 sp-skeleton.h
527 sp-spiral.cpp
528 sp-spiral.h
529 sp-star.cpp
530 sp-star.h
531 sp-stop-fns.h
532 sp-stop.h
533 sp-string.cpp
534 sp-string.h
535 sp-style-elem.cpp
536 sp-style-elem.h
537 sp-style-elem-test.h
538 sp-switch.cpp
539 sp-switch.h
540 sp-symbol.cpp
541 sp-symbol.h
542 sp-text.cpp
543 sp-text.h
544 sp-textpath.h
545 sp-tref.cpp
546 sp-tref.h
547 sp-tref-reference.cpp
548 sp-tref-reference.h
549 sp-tspan.cpp
550 sp-tspan.h
551 sp-use.cpp
552 sp-use.h
553 sp-use-reference.cpp
554 sp-use-reference.h
555 star-context.cpp
556 star-context.h
557 streams-gzip.cpp
558 streams-gzip.h
559 streams-handles.cpp
560 streams-handles.h
561 streams-jar.cpp
562 streams-jar.h
563 streams-zlib.cpp
564 streams-zlib.h
565 streq.h
566 strneq.h
567 style.cpp
568 style.h
569 style-test.cpp
570 style-test.h
571 svg-profile.h
572 svg-view.cpp
573 svg-view.h
574 svg-view-widget.cpp
575 svg-view-widget.h
576 syseq.h
577 test-helpers.h
578 text-chemistry.cpp
579 text-chemistry.h
580 text-context.cpp
581 text-context.h
582 text-editing.cpp
583 text-editing.h
584 text-tag-attributes.h
585 tools-switch.cpp
586 tools-switch.h
587 transf_mat_3x4.cpp
588 transf_mat_3x4.h
589 TRPIFormatter.h
590 tweak-context.cpp
591 tweak-context.h
592 undo-stack-observer.h
593 unit-constants.h
594 uri.cpp
595 uri.h
596 uri-references.cpp
597 uri-references.h
598 vanishing-point.cpp
599 vanishing-point.h
600 verbs.cpp
601 verbs.h
602 verbs-test.h
603 version.cpp
604 version.h
605 zoom-context.cpp
606 zoom-context.h\r
607 ${ONLY_WIN}
608 \r
609 )\r
610 \r
611 # make executable for INKSCAPE\r
612 ADD_EXECUTABLE(inkscape ${INKSCAPE_SRC})\r
613 TARGET_LINK_LIBRARIES(inkscape\r
614         "${INKSCAPE_LINK_FLAGS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot\r
615 )\r
616 #INSTALL(TARGETS INKSCAPE\r
617 #  RUNTIME DESTINATION bin\r
618 #  LIBRARY DESTINATION lib\r
619 #  ARCHIVE DESTINATION lib\r
620 #)\r
621 \r
622 #FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.h")\r
623 #INSTALL(FILES ${files} DESTINATION include/INKSCAPE/INKSCAPE)\r
624 \r
625 #CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/INKSCAPE.pc.in\r
626 #                ${CMAKE_BINARY_DIR}/INKSCAPE.pc @ONLY IMMEDIATE )\r
627 #INSTALL(FILES "${CMAKE_BINARY_DIR}/INKSCAPE.pc" DESTINATION lib/pkgconfig)\r