From: verbalshadow Date: Fri, 9 Jan 2009 01:57:18 +0000 (+0000) Subject: Cmake: restructure build files to be more like current build system. Should reduce... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7618c62c0c61a49f0d6330e4e1d44394ffa899e0;p=inkscape.git Cmake: restructure build files to be more like current build system. Should reduce linking stage command for windows. --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a6a1e2a74..062d4b6b1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,6 +6,7 @@ IF(WIN32) ELSEIF(WIN32) SET(ONLY_WIN) ENDIF(WIN32) + SET(SP_SRC sp-anchor.cpp sp-animation.cpp @@ -15,26 +16,6 @@ sp-conn-end-pair.cpp sp-cursor.cpp sp-defs.cpp sp-ellipse.cpp -# sp-feblend.cpp -# sp-fecolormatrix.cpp -# sp-fecomponenttransfer.cpp -# sp-fecomponenttransfer-funcnode.cpp -# sp-fecomposite.cpp -# sp-feconvolvematrix.cpp -# sp-fediffuselighting.cpp -# sp-fedisplacementmap.cpp -# sp-fedistantlight.cpp -# sp-feflood.cpp -# sp-feimage.cpp -# sp-femerge.cpp -# sp-femergenode.cpp -# sp-femorphology.cpp -# sp-feoffset.cpp -# sp-fepointlight.cpp -# sp-fespecularlighting.cpp -# sp-fespotlight.cpp -# sp-fetile.cpp -# sp-feturbulence.cpp sp-filter.cpp sp-filter-primitive.cpp sp-filter-reference.cpp @@ -220,8 +201,8 @@ version.cpp zoom-context.cpp ${ONLY_WIN} ) -# All folder with CMakeLists.txt files (excluding internal libraries) -SET(srcfolders +# All folders for internal inkscape +SET(internalfolders algorithms api application @@ -230,56 +211,28 @@ debug dialogs display dom -dom/io -dom/odf -dom/util -#dom/work extension -#extension/dxf2svg -extension/implementation -extension/internal -extension/internal/bitmap -extension/internal/filter -extension/internal/pdfinput -extension/param -extension/script +filters graphlayout helper inkjar io jabber_whiteboard -jabber_whiteboard/dialog live_effects -live_effects/parameter pedro removeoverlap svg trace -trace/potrace traits -ui/cache ui -ui/dialog -ui/view -ui/widget -#utest util widgets xml ) -# 1) include each list file -# 2) grab the variable inside -# 3) prepend the full relative path to each file in list -# 4) append the list to INKSCAPE_SRC -FOREACH(dirlist ${srcfolders}) - SET(_temp_dirlist "${dirlist}") - MESSAGE(STATUS "Processing ${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt") - INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt) - SANITIZE_PATH(dirlist) - PREPEND(${dirlist}_SRC "${_temp_dirlist}/") - SET(INKSCAPE_SRC ${INKSCAPE_SRC} ${${dirlist}_SRC}) -ENDFOREACH(dirlist) +FOREACH(srclistsrc ${internalfolders}) + ADD_SUBDIRECTORY(${srclistsrc}) +ENDFOREACH(srclistsrc) SET(INKSCAPE_SRC ${INKSCAPE_SRC} ${GlibOutput}) # All directories containing lists files that describe building internal libraries @@ -307,12 +260,12 @@ TARGET_LINK_LIBRARIES(sp # make executable for INKSCAPE ADD_EXECUTABLE(inkscape ${INKSCAPE_SRC}) TARGET_LINK_LIBRARIES(inkscape - 2geom avoid cola croco gdl nr nrtype vpsc livarot sp + 2geom avoid cola croco gdl nr nrtype vpsc livarot sp ${internalfolders} ) # make executable for INKVIEW #ADD_EXECUTABLE(inkview inkview.cpp) #TARGET_LINK_LIBRARIES(inkview -# "${INKSCAPE_LINK_FLAGS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot sp +# "${INKSCAPE_LINK_FLAGS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot sp ${internalfolders} #) diff --git a/src/algorithms/CMakeLists.txt b/src/algorithms/CMakeLists.txt index c4ef6aafb..0ac17f57c 100644 --- a/src/algorithms/CMakeLists.txt +++ b/src/algorithms/CMakeLists.txt @@ -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 diff --git a/src/application/CMakeLists.txt b/src/application/CMakeLists.txt index 242798c9e..aa1a03911 100644 --- a/src/application/CMakeLists.txt +++ b/src/application/CMakeLists.txt @@ -3,3 +3,4 @@ editor.cpp application.cpp app-prototype.cpp ) +ADD_LIBRARY(application STATIC ${application_SRC}) \ No newline at end of file diff --git a/src/bind/CMakeLists.txt b/src/bind/CMakeLists.txt index 2588d45aa..0708c3eff 100644 --- a/src/bind/CMakeLists.txt +++ b/src/bind/CMakeLists.txt @@ -2,3 +2,4 @@ SET(bind_SRC dobinding.cpp javabind.cpp ) +ADD_LIBRARY(bind STATIC ${bind_SRC}) \ No newline at end of file diff --git a/src/debug/CMakeLists.txt b/src/debug/CMakeLists.txt index 5eb0b3cfe..27088acf9 100644 --- a/src/debug/CMakeLists.txt +++ b/src/debug/CMakeLists.txt @@ -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 diff --git a/src/dialogs/CMakeLists.txt b/src/dialogs/CMakeLists.txt index e9fa7c6fc..d5007b13d 100644 --- a/src/dialogs/CMakeLists.txt +++ b/src/dialogs/CMakeLists.txt @@ -23,3 +23,4 @@ text-edit.cpp unclump.cpp xml-tree.cpp ) +ADD_LIBRARY(dialogs STATIC ${dialogs_SRC}) \ No newline at end of file diff --git a/src/dom/CMakeLists.txt b/src/dom/CMakeLists.txt index 2f6963783..8a85390aa 100644 --- a/src/dom/CMakeLists.txt +++ b/src/dom/CMakeLists.txt @@ -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 diff --git a/src/extension/CMakeLists.txt b/src/extension/CMakeLists.txt index 56781f909..d712eb61f 100644 --- a/src/extension/CMakeLists.txt +++ b/src/extension/CMakeLists.txt @@ -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 diff --git a/src/graphlayout/CMakeLists.txt b/src/graphlayout/CMakeLists.txt index e570a7a5d..4ad15eb43 100644 --- a/src/graphlayout/CMakeLists.txt +++ b/src/graphlayout/CMakeLists.txt @@ -1,3 +1,4 @@ SET(graphlayout_SRC graphlayout.cpp ) +ADD_LIBRARY(graphlayout STATIC ${graphlayout_SRC}) \ No newline at end of file diff --git a/src/helper/CMakeLists.txt b/src/helper/CMakeLists.txt index 4ad7db1b1..fe8179199 100644 --- a/src/helper/CMakeLists.txt +++ b/src/helper/CMakeLists.txt @@ -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 diff --git a/src/helper/unit-menu.cpp b/src/helper/unit-menu.cpp index 809d8f929..19139979e 100644 --- a/src/helper/unit-menu.cpp +++ b/src/helper/unit-menu.cpp @@ -21,7 +21,7 @@ #include #include #include -#include "helper/sp-marshal.h" +#include "sp-marshal.h" #include "helper/units.h" #include "unit-menu.h" #include "widgets/spw-utilities.h" diff --git a/src/inkjar/CMakeLists.txt b/src/inkjar/CMakeLists.txt index 501441940..2d4f52ca3 100644 --- a/src/inkjar/CMakeLists.txt +++ b/src/inkjar/CMakeLists.txt @@ -1,3 +1,4 @@ SET(inkjar_SRC jar.cpp ) +ADD_LIBRARY(inkjar STATIC ${inkjar_SRC}) \ No newline at end of file diff --git a/src/io/CMakeLists.txt b/src/io/CMakeLists.txt index 4da53ce0a..8db1b518c 100644 --- a/src/io/CMakeLists.txt +++ b/src/io/CMakeLists.txt @@ -11,3 +11,4 @@ sys.cpp uristream.cpp xsltstream.cpp ) +ADD_LIBRARY(io STATIC ${io_SRC}) \ No newline at end of file diff --git a/src/jabber_whiteboard/CMakeLists.txt b/src/jabber_whiteboard/CMakeLists.txt index e1b069d21..f428c84c6 100644 --- a/src/jabber_whiteboard/CMakeLists.txt +++ b/src/jabber_whiteboard/CMakeLists.txt @@ -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 diff --git a/src/live_effects/CMakeLists.txt b/src/live_effects/CMakeLists.txt index 583386796..80a982bc3 100644 --- a/src/live_effects/CMakeLists.txt +++ b/src/live_effects/CMakeLists.txt @@ -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 diff --git a/src/pedro/CMakeLists.txt b/src/pedro/CMakeLists.txt index ac24ba8d2..207afd451 100644 --- a/src/pedro/CMakeLists.txt +++ b/src/pedro/CMakeLists.txt @@ -8,3 +8,4 @@ pedrodom.cpp pedroutil.cpp pedroxmpp.cpp ) +ADD_LIBRARY(pedro STATIC ${pedro_SRC}) \ No newline at end of file diff --git a/src/removeoverlap/CMakeLists.txt b/src/removeoverlap/CMakeLists.txt index a7c18b886..abb01eb55 100644 --- a/src/removeoverlap/CMakeLists.txt +++ b/src/removeoverlap/CMakeLists.txt @@ -1,3 +1,4 @@ SET(removeoverlap_SRC removeoverlap.cpp ) +ADD_LIBRARY(removeoverlap STATIC ${removeoverlap_SRC}) \ No newline at end of file diff --git a/src/svg/CMakeLists.txt b/src/svg/CMakeLists.txt index fbf214393..f015646b8 100644 --- a/src/svg/CMakeLists.txt +++ b/src/svg/CMakeLists.txt @@ -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 diff --git a/src/trace/CMakeLists.txt b/src/trace/CMakeLists.txt index 053d77ad9..0eb445dee 100644 --- a/src/trace/CMakeLists.txt +++ b/src/trace/CMakeLists.txt @@ -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 diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 6c5a9350b..f788a04bf 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -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 diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index 82b5a0fb0..5e193a8f2 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -2,3 +2,4 @@ SET(util_SRC share.cpp units.cpp ) +ADD_LIBRARY(util STATIC ${util_SRC}) \ No newline at end of file diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt index 80ab4c528..24c1d30d2 100644 --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -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 diff --git a/src/widgets/sp-xmlview-attr-list.cpp b/src/widgets/sp-xmlview-attr-list.cpp index 008ad4970..9ee9fcdd0 100644 --- a/src/widgets/sp-xmlview-attr-list.cpp +++ b/src/widgets/sp-xmlview-attr-list.cpp @@ -16,7 +16,7 @@ #include #include -#include "helper/sp-marshal.h" +#include "../helper/sp-marshal.h" #include "../xml/node-event-vector.h" #include "sp-xmlview-attr-list.h" diff --git a/src/xml/CMakeLists.txt b/src/xml/CMakeLists.txt index 9ee5b4626..4036cb1af 100644 --- a/src/xml/CMakeLists.txt +++ b/src/xml/CMakeLists.txt @@ -16,3 +16,4 @@ simple-document.cpp simple-node.cpp subtree.cpp ) +ADD_LIBRARY(xml STATIC ${xml_SRC}) \ No newline at end of file