Code

Cmake: restructure build files to be more like current build system. Should reduce...
authorverbalshadow <verbalshadow@users.sourceforge.net>
Fri, 9 Jan 2009 01:57:18 +0000 (01:57 +0000)
committerverbalshadow <verbalshadow@users.sourceforge.net>
Fri, 9 Jan 2009 01:57:18 +0000 (01:57 +0000)
24 files changed:
src/CMakeLists.txt
src/algorithms/CMakeLists.txt
src/application/CMakeLists.txt
src/bind/CMakeLists.txt
src/debug/CMakeLists.txt
src/dialogs/CMakeLists.txt
src/dom/CMakeLists.txt
src/extension/CMakeLists.txt
src/graphlayout/CMakeLists.txt
src/helper/CMakeLists.txt
src/helper/unit-menu.cpp
src/inkjar/CMakeLists.txt
src/io/CMakeLists.txt
src/jabber_whiteboard/CMakeLists.txt
src/live_effects/CMakeLists.txt
src/pedro/CMakeLists.txt
src/removeoverlap/CMakeLists.txt
src/svg/CMakeLists.txt
src/trace/CMakeLists.txt
src/ui/CMakeLists.txt
src/util/CMakeLists.txt
src/widgets/CMakeLists.txt
src/widgets/sp-xmlview-attr-list.cpp
src/xml/CMakeLists.txt

index a6a1e2a74a014fa2da259d77a2cc75172299aa3f..062d4b6b1b5e96e052eab14094320c44e51b148e 100644 (file)
@@ -6,6 +6,7 @@ IF(WIN32)
 ELSEIF(WIN32)\r
     SET(ONLY_WIN)\r
 ENDIF(WIN32)\r
+\r
 SET(SP_SRC\r
 sp-anchor.cpp\r
 sp-animation.cpp\r
@@ -15,26 +16,6 @@ sp-conn-end-pair.cpp
 sp-cursor.cpp\r
 sp-defs.cpp\r
 sp-ellipse.cpp\r
-# sp-feblend.cpp\r
-# sp-fecolormatrix.cpp\r
-# sp-fecomponenttransfer.cpp\r
-# sp-fecomponenttransfer-funcnode.cpp\r
-# sp-fecomposite.cpp\r
-# sp-feconvolvematrix.cpp\r
-# sp-fediffuselighting.cpp\r
-# sp-fedisplacementmap.cpp\r
-# sp-fedistantlight.cpp\r
-# sp-feflood.cpp\r
-# sp-feimage.cpp\r
-# sp-femerge.cpp\r
-# sp-femergenode.cpp\r
-# sp-femorphology.cpp\r
-# sp-feoffset.cpp\r
-# sp-fepointlight.cpp\r
-# sp-fespecularlighting.cpp\r
-# sp-fespotlight.cpp\r
-# sp-fetile.cpp\r
-# sp-feturbulence.cpp\r
 sp-filter.cpp\r
 sp-filter-primitive.cpp\r
 sp-filter-reference.cpp\r
@@ -220,8 +201,8 @@ version.cpp
 zoom-context.cpp\r
 ${ONLY_WIN}\r
 )\r
-# All folder with CMakeLists.txt files (excluding internal libraries)\r
-SET(srcfolders\r
+# All folders for internal inkscape\r
+SET(internalfolders\r
 algorithms\r
 api\r
 application\r
@@ -230,56 +211,28 @@ debug
 dialogs\r
 display\r
 dom\r
-dom/io\r
-dom/odf\r
-dom/util\r
-#dom/work\r
 extension\r
-#extension/dxf2svg\r
-extension/implementation\r
-extension/internal\r
-extension/internal/bitmap\r
-extension/internal/filter\r
-extension/internal/pdfinput\r
-extension/param\r
-extension/script\r
+filters\r
 graphlayout\r
 helper\r
 inkjar\r
 io\r
 jabber_whiteboard\r
-jabber_whiteboard/dialog\r
 live_effects\r
-live_effects/parameter\r
 pedro\r
 removeoverlap\r
 svg\r
 trace\r
-trace/potrace\r
 traits\r
-ui/cache\r
 ui\r
-ui/dialog\r
-ui/view\r
-ui/widget\r
-#utest\r
 util\r
 widgets\r
 xml\r
 )\r
 \r
-# 1) include each list file\r
-# 2) grab the variable inside \r
-# 3) prepend the full relative path to each file in list\r
-# 4) append the list to INKSCAPE_SRC\r
-FOREACH(dirlist ${srcfolders})\r
-  SET(_temp_dirlist "${dirlist}")\r
-  MESSAGE(STATUS "Processing ${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt")\r
-  INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt)\r
-  SANITIZE_PATH(dirlist)\r
-  PREPEND(${dirlist}_SRC "${_temp_dirlist}/")\r
-  SET(INKSCAPE_SRC ${INKSCAPE_SRC} ${${dirlist}_SRC})\r
-ENDFOREACH(dirlist)\r
+FOREACH(srclistsrc ${internalfolders})\r
+  ADD_SUBDIRECTORY(${srclistsrc})\r
+ENDFOREACH(srclistsrc)\r
 \r
 SET(INKSCAPE_SRC ${INKSCAPE_SRC} ${GlibOutput})\r
 # All directories containing lists files that describe building internal libraries\r
@@ -307,12 +260,12 @@ TARGET_LINK_LIBRARIES(sp
 # make executable for INKSCAPE\r
 ADD_EXECUTABLE(inkscape ${INKSCAPE_SRC})\r
 TARGET_LINK_LIBRARIES(inkscape\r
-        2geom avoid cola croco gdl nr nrtype vpsc livarot sp\r
+        2geom avoid cola croco gdl nr nrtype vpsc livarot sp ${internalfolders}\r
 )\r
 \r
 # make executable for INKVIEW\r
 #ADD_EXECUTABLE(inkview inkview.cpp)\r
 #TARGET_LINK_LIBRARIES(inkview\r
-#      "${INKSCAPE_LINK_FLAGS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot sp\r
+#      "${INKSCAPE_LINK_FLAGS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot sp ${internalfolders}\r
 #)\r
 \r
index c4ef6aafb8e0ce69a5f2bb05a27a01784e37a0d3..0ac17f57cb60b827dfc25337cd15c6cd585665ec 100644 (file)
@@ -1,5 +1,6 @@
-SET(algorithms_SRC
-find-if-before.h
-find-last-if.h
-longest-common-suffix.h
-)
+#SET(algorithms_SRC
+#find-if-before.h
+#find-last-if.h
+#longest-common-suffix.h
+#)
+#ADD_LIBRARY(algorithms STATIC ${algorithms_SRC})
\ No newline at end of file
index 242798c9ebf4f6fbb75946b95310fe76d775e7b3..aa1a039113230889c2fbbff593971ea5baf4d6b1 100644 (file)
@@ -3,3 +3,4 @@ editor.cpp
 application.cpp
 app-prototype.cpp
 )
+ADD_LIBRARY(application STATIC ${application_SRC})
\ No newline at end of file
index 2588d45aab4d2778a29ccdafcdcea9441fc8ec16..0708c3eff71918f8e02ee1d707070b4b618947bb 100644 (file)
@@ -2,3 +2,4 @@ SET(bind_SRC
 dobinding.cpp
 javabind.cpp
 )
+ADD_LIBRARY(bind STATIC ${bind_SRC})
\ No newline at end of file
index 5eb0b3cfe01918f48d3685452e5bc3680dafc5ec..27088acf9446f574863cd8807aca3f11891a127e 100644 (file)
@@ -7,4 +7,4 @@ sysv-heap.cpp
 timestamp.cpp
 gdk-event-latency-tracker.cpp
 )
-
+ADD_LIBRARY(debug STATIC ${debug_SRC})
\ No newline at end of file
index e9fa7c6fc41521c604e9e21defc397f06fc0d877..d5007b13d070df475ac935c2d1b193c5a951edba 100644 (file)
@@ -23,3 +23,4 @@ text-edit.cpp
 unclump.cpp
 xml-tree.cpp
 )
+ADD_LIBRARY(dialogs STATIC ${dialogs_SRC})
\ No newline at end of file
index 2f6963783ff9960896e62656fde20381154468af..8a85390aa2a77299499c03402ff04b84910a33a8 100644 (file)
@@ -1,3 +1,14 @@
+SET(domfolders
+io
+odf
+util
+#work
+)
+
+FOREACH(domlistsrc ${domfolders})
+  ADD_SUBDIRECTORY(${domlistsrc})
+ENDFOREACH(domlistsrc)
+
 SET(dom_SRC
 cssreader.cpp
 domimpl.cpp
@@ -17,4 +28,9 @@ xmlwriter.cpp
 xpathimpl.cpp
 xpathparser.cpp
 xpathtoken.cpp
+${dom_io_SRC}
+${dom_odf_SRC}
+${dom_util_SRC}
+#${dom_work_SRC}
 )
+ADD_LIBRARY(dom STATIC ${dom_SRC})
\ No newline at end of file
index 56781f9090150805739d6046dcd9b25a85cd8a64..d712eb61fdf94370b3867662361b090a44bedfbf 100644 (file)
@@ -1,3 +1,18 @@
+SET(extfolders
+#dxf2svg
+implementation
+internal
+internal/bitmap
+internal/filter
+internal/pdfinput
+param
+script
+)
+
+FOREACH(extlistsrc ${extfolders})
+  ADD_SUBDIRECTORY(${extlistsrc})
+ENDFOREACH(extlistsrc)
+
 SET(extension_SRC
 db.cpp
 dependency.cpp
@@ -13,4 +28,12 @@ prefdialog.cpp
 print.cpp
 system.cpp
 timer.cpp
+#${extension_dxf2svg_SRC}
+${extension_implementation_SRC}
+${extension_internal_bitmap_SRC}
+${extension_internal_filter_SRC}
+${extension_internal_pdfinput_SRC}
+${extension_param_SRC}
+${extension_script_SRC}
 )
+ADD_LIBRARY(extension STATIC ${extension_SRC})
\ No newline at end of file
index e570a7a5d9bb5c189abebb1814b4336980a22dbe..4ad15eb43886266885086f96c518c4040b9e2a92 100644 (file)
@@ -1,3 +1,4 @@
 SET(graphlayout_SRC
 graphlayout.cpp
 )
+ADD_LIBRARY(graphlayout STATIC ${graphlayout_SRC})
\ No newline at end of file
index 4ad7db1b16afe8e00cde598245fc1c196bd77bcc..fe817919936cb1e9dd363f468c307067c2b893aa 100644 (file)
@@ -1,13 +1,15 @@
 include(UseGlibMarshal)
 
-GLIB_MARSHAL(sp_marshal helper/sp-marshal "${CMAKE_CURRENT_BINARY_DIR}/helper")
+GLIB_MARSHAL(sp_marshal sp-marshal "${CMAKE_CURRENT_BINARY_DIR}/helper")
 SET(GlibOutput
-${CMAKE_CURRENT_BINARY_DIR}/helper/sp-marshal.cpp
-${CMAKE_CURRENT_BINARY_DIR}/helper/sp-marshal.h
+${CMAKE_CURRENT_BINARY_DIR}/sp-marshal.cpp
+${CMAKE_CURRENT_BINARY_DIR}/sp-marshal.h
 )
 
 SET(helper_SRC
 action.cpp
+geom.cpp
+geom-nodetype.cpp
 gnome-utils.cpp
 pixbuf-ops.cpp
 png-write.cpp
@@ -19,5 +21,7 @@ unit-tracker.cpp
 window.cpp
 sp-marshal.list
 # we generate this file and it's .h counter-part
-#${CMAKE_CURRENT_BINARY_DIR}/helper/sp-marshal.cpp
+${CMAKE_CURRENT_BINARY_DIR}/sp-marshal.cpp
+${CMAKE_CURRENT_BINARY_DIR}/sp-marshal.h
 )
+ADD_LIBRARY(helper STATIC ${helper_SRC})
\ No newline at end of file
index 809d8f92942ddbad61d06e91c3527f14023b290d..19139979ef6e6b41f2b389ba2335a04bd0447c3d 100644 (file)
@@ -21,7 +21,7 @@
 #include <gtk/gtkhbox.h>
 #include <gtk/gtkmenu.h>
 #include <gtk/gtkmenuitem.h>
-#include "helper/sp-marshal.h"
+#include "sp-marshal.h"
 #include "helper/units.h"
 #include "unit-menu.h"
 #include "widgets/spw-utilities.h"
index 50144194049a5402080e3f2f66525c3416533c88..2d4f52ca36d9239059ec152bc8a1f0e8afe76c39 100644 (file)
@@ -1,3 +1,4 @@
 SET(inkjar_SRC
 jar.cpp
 )
+ADD_LIBRARY(inkjar STATIC ${inkjar_SRC})
\ No newline at end of file
index 4da53ce0ab69a8ef836a3d96e575bc4f05d6ae8e..8db1b518c80203583cfd0116e15463afba43bb74 100644 (file)
@@ -11,3 +11,4 @@ sys.cpp
 uristream.cpp
 xsltstream.cpp
 )
+ADD_LIBRARY(io STATIC ${io_SRC})
\ No newline at end of file
index e1b069d218dd4e0c6d18b258e0c78d042050ba71..f428c84c621a002950bb50ddb4dd7f9927351686 100644 (file)
@@ -1,3 +1,5 @@
+ADD_SUBDIRECTORY(dialog)
+
 SET(jabber_whiteboard_SRC
 defines.cpp
 empty.cpp
@@ -14,4 +16,6 @@ message-utilities.cpp
 pedrogui.cpp
 session-file-selector.cpp
 session-manager.cpp
+${jabber_whiteboard_dialog_SRC}
 )
+ADD_LIBRARY(jabber_whiteboard STATIC ${jabber_whiteboard_SRC})
\ No newline at end of file
index 583386796e65c05ba4f007dba55e43ff50af68d4..80a982bc3c0338abdb3d05bb694ac0e6733066b9 100644 (file)
@@ -1,3 +1,5 @@
+ADD_SUBDIRECTORY(parameter)
+
 SET(live_effects_SRC
 bezctx.cpp
 effect.cpp
@@ -27,4 +29,6 @@ lpe-test-doEffect-stack.cpp
 lpe-vonkoch.cpp
 lpe-dynastroke.cpp
 spiro.cpp
+${live_effects_parameter_SRC}
 )
+ADD_LIBRARY(live_effects STATIC ${live_effects_SRC})
\ No newline at end of file
index ac24ba8d2e8b9843af8b1913bd9482ff7757fd07..207afd451d0b2306d4cb8d517a68b69f0e21ed3f 100644 (file)
@@ -8,3 +8,4 @@ pedrodom.cpp
 pedroutil.cpp
 pedroxmpp.cpp
 )
+ADD_LIBRARY(pedro STATIC ${pedro_SRC})
\ No newline at end of file
index a7c18b8869e30d59d24239e74d2799e451b9a11c..abb01eb55b4e50d675ba91031b86dcd4ddbbbcfe 100644 (file)
@@ -1,3 +1,4 @@
 SET(removeoverlap_SRC
 removeoverlap.cpp
 )
+ADD_LIBRARY(removeoverlap STATIC ${removeoverlap_SRC})
\ No newline at end of file
index fbf2143935c28d2bc7f44fa5eff49e59bdae2fad..f015646b8298f71cdca73165e20a1db72d988b9d 100644 (file)
@@ -13,3 +13,4 @@ svg-length.cpp
 svg-path.cpp
 #test-stubs.cpp
 )
+ADD_LIBRARY(svg STATIC ${svg_SRC})
\ No newline at end of file
index 053d77ad94ecb16681f018e819b5700035f43f39..0eb445dee57affed0389be4492e8cc2abf35551a 100644 (file)
@@ -1,3 +1,4 @@
+ADD_SUBDIRECTORY(potrace)
 SET(trace_SRC
 filterset.cpp
 imagemap.cpp
@@ -5,4 +6,6 @@ imagemap-gdk.cpp
 quantize.cpp
 siox.cpp
 trace.cpp
+${trace_potrace_SRC}
 )
+ADD_LIBRARY(trace STATIC ${trace_SRC})
\ No newline at end of file
index 6c5a9350bea8018c1dd2bfb63f4ae2cdd5a71e78..f788a04bf85ad9d6172bc12f6fdbc59cc300e443 100644 (file)
@@ -1,7 +1,22 @@
+SET(uifolders
+cache
+dialog
+view
+widget
+)
+FOREACH(uilistsrc ${uifolders})
+  ADD_SUBDIRECTORY(${uilistsrc})
+ENDFOREACH(uilistsrc)
+
 SET(ui_SRC
 clipboard.cpp
 context-menu.cpp
 previewholder.cpp
 stock.cpp
 stock-items.cpp
+${ui_cache_SRC}
+${ui_dialog_SRC}
+${ui_view_SRC}
+${ui_widget_SRC}
 )
+ADD_LIBRARY(ui STATIC ${ui_SRC})
\ No newline at end of file
index 82b5a0fb0a8c9c0f54c9587b3553fd3c4e9783a1..5e193a8f23237c24a7d2035d2da880ff07edf2df 100644 (file)
@@ -2,3 +2,4 @@ SET(util_SRC
 share.cpp
 units.cpp
 )
+ADD_LIBRARY(util STATIC ${util_SRC})
\ No newline at end of file
index 80ab4c5286429764eb708657a98a963432a34e71..24c1d30d29f9e7543f54e5a473af31cbfb0d0e52 100644 (file)
@@ -31,3 +31,4 @@ sp-xmlview-content.cpp
 sp-xmlview-tree.cpp
 toolbox.cpp
 )
+ADD_LIBRARY(widgets STATIC ${widgets_SRC})
\ No newline at end of file
index 008ad4970e72e56333c375f3a54f812396c86275..9ee9fcdd00573fb0be1715ac1380ceab7b889c6c 100644 (file)
@@ -16,7 +16,7 @@
 #include <cstring>
 #include <glibmm/i18n.h>
 
-#include "helper/sp-marshal.h"
+#include "../helper/sp-marshal.h"
 #include "../xml/node-event-vector.h"
 #include "sp-xmlview-attr-list.h"
 
index 9ee5b46261a862e5f359cf3b701a5dd9ac76ccbd..4036cb1afa56382067df01d736b46748e26a09cb 100644 (file)
@@ -16,3 +16,4 @@ simple-document.cpp
 simple-node.cpp
 subtree.cpp
 )
+ADD_LIBRARY(xml STATIC ${xml_SRC})
\ No newline at end of file