Code

Cmake: Moved helper macros to their own file and removed *-test.h from inkscape sourc...
authorverbalshadow <verbalshadow@users.sourceforge.net>
Mon, 5 May 2008 07:40:40 +0000 (07:40 +0000)
committerverbalshadow <verbalshadow@users.sourceforge.net>
Mon, 5 May 2008 07:40:40 +0000 (07:40 +0000)
CMakeLists.txt
CMakeScripts/ConfigCompileFlags.cmake
CMakeScripts/ConfigInkscapeDepends.cmake
CMakeScripts/HelperMacros.cmake [new file with mode: 0644]
src/CMakeLists.txt
src/helper/CMakeLists.txt

index c911d2fc4b9baf791610074810a56c6841d97f0f..608ac6a9c7976cccbcef029b09544da0cc8a196b 100644 (file)
@@ -14,9 +14,9 @@ SET(CMAKE_COLOR_MAKEFILE ON)
 SET(CMAKE_VERBOSE_MAKEFILE OFF)\r
 
 SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeScripts)
-INCLUDE(ConfigPaths)\r
+INCLUDE(ConfigPaths)
 INCLUDE(ConfigInkscapeDepends)\r
-INCLUDE(ConfigCompileFlags)
+INCLUDE(HelperMacros)
 \r
 #SET(CMAKE_MAJOR_MINOR "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")\r
 #IF("${CMAKE_MAJOR_MINOR}" STREQUAL "2.2")\r
@@ -51,7 +51,3 @@ po
 FOREACH(dirlist ${folders})\r
 ADD_SUBDIRECTORY(${dirlist})\r
 ENDFOREACH(dirlist)
-
-message(STATUS "3XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
-message(STATUS "${INKSCAPE_LINK_FLAGS}")
-message(STATUS "3XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
index c5447df49ff2737d9795eb2b794b154db7231be9..d4ed503cb00e4bba5d021b3b0ed7f451a4a7b69a 100644 (file)
@@ -22,3 +22,4 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_PROFILING_FLAGS} ")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_PROFILING_FLAGS} ")
 
 SET(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} ")
+message(STATUS "${CMAKE_CXX_FLAGS}")
index 1f0eac63988a9d4224d1d71eb3ee4a8d6dcad34c..7b74aef71bfc4929f219b105d98af636ce7921a1 100644 (file)
@@ -9,7 +9,7 @@ SET(INKSCAPE_DEPENDS
     gtkmm-2.4
     sigc++-2.0\r
     lcms\r
-    libgc1c2\r
+#    libgc1c2\r
     libpng\r
     libxml-2.0\r
     libxslt\r
@@ -51,8 +51,10 @@ FOREACH(dep ${INKSCAPE_DEPENDS})
 ENDFOREACH(dep)
 \r
 # Include non pkg-config dependencies:\r
-INCLUDE(FindBoost)\r
-INCLUDE(FindGC)\r
+INCLUDE(FindBoost)
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${BOOST_INCLUDE_DIR} ")\r
+INCLUDE(FindGC)
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${LIBGC_INCLUDE_DIR} ")\r
 INCLUDE(IncludeJava)\r
 # end Dependencies\r
 \r
diff --git a/CMakeScripts/HelperMacros.cmake b/CMakeScripts/HelperMacros.cmake
new file mode 100644 (file)
index 0000000..dd8c25f
--- /dev/null
@@ -0,0 +1,13 @@
+# A macro to replace slashes and spaces in a string with underscores\r
+MACRO(SANITIZE_PATH _string_var)\r
+  STRING(REGEX REPLACE "[\\/ ]+" "_" ${_string_var} ${${_string_var}})\r
+ENDMACRO(SANITIZE_PATH _string_var)\r
+\r
+# A macro to prepend a given string onto the beginning of each string in a list\r
+MACRO(PREPEND _list _str)\r
+  SET(_temp_list ${${_list}})\r
+  SET(${_list})\r
+  FOREACH(x ${_temp_list})\r
+    SET(${_list} ${${_list}} ${_str}${x})\r
+  ENDFOREACH(x)\r
+ENDMACRO(PREPEND _list _str)
index 6e446b2848b056fc2c9b5a89379c8943dc911bed..91e87d740fcfc4adf21c614322869eef25dd8942 100644 (file)
-SET(INKSCAPE_SRC)\r
-\r
-# A macro to replace slashes and spaces in a string with underscores\r
-MACRO(SANITIZE_PATH _string_var)\r
-  STRING(REGEX REPLACE "[\\/ ]+" "_" ${_string_var} ${${_string_var}})\r
-ENDMACRO(SANITIZE_PATH _string_var)\r
-\r
-# A macro to prepend a given string onto the beginning of each string in a list\r
-MACRO(PREPEND _list _str)\r
-  SET(_temp_list ${${_list}})\r
-  SET(${_list})\r
-  FOREACH(x ${_temp_list})\r
-    SET(${_list} ${${_list}} ${_str}${x})\r
-  ENDFOREACH(x)\r
-ENDMACRO(PREPEND _list _str)\r
-\r
-# All folder with CMakeLists.txt files (excluding internal libraries)\r
-SET(srcfolders\r
-algorithms\r
-api\r
-bind\r
-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/param\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
-\r
-\r
-# All directories containing lists files that describe building internal libraries\r
-SET(libfolders
-2geom\r
-application\r
-#dialogs\r
-libavoid\r
-libcola\r
-libcroco\r
-libgdl\r
-libnr\r
-libnrtype\r
-libvpsc
-livarot\r
-)\r
-\r
-FOREACH(dirlist ${libfolders})\r
-  ADD_SUBDIRECTORY(${dirlist})\r
-ENDFOREACH(dirlist)\r
-\r
 IF(WIN32)\r
-SET(ONLY_WIN\r
-registrytool.cpp
-registrytool.h\r
-#deptool.cpp
-winmain.cpp\r
-)\r
+    SET(ONLY_WIN\r
+    registrytool.cpp
+    registrytool.h\r
+    #deptool.cpp
+    winmain.cpp)\r
 ELSEIF(WIN32)\r
-SET(ONLY_WIN)\r
+    SET(ONLY_WIN)\r
 ENDIF(WIN32)\r
 \r
 SET(INKSCAPE_SRC\r
-${INKSCAPE_SRC}\r
 approx-equal.h
 arc-context.cpp
 arc-context.h
 attributes.cpp
 attributes.h
-attributes-test.h
+#attributes-test.h
 axis-manip.cpp
 axis-manip.h
 bad-uri-exception.h
@@ -124,7 +30,7 @@ color.h
 color-profile.cpp
 color-profile-fns.h
 color-profile.h
-color-profile-test.h
+#color-profile-test.h
 color-rgba.h
 composite-undo-stack-observer.cpp
 composite-undo-stack-observer.h
@@ -155,7 +61,7 @@ device-manager.cpp
 device-manager.h
 dir-util.cpp
 dir-util.h
-dir-util-test.h
+#dir-util-test.h
 document.cpp
 document.h
 document-private.h
@@ -190,7 +96,7 @@ event-log.h
 extension
 extract-uri.cpp
 extract-uri.h
-extract-uri-test.h
+#extract-uri-test.h
 file.cpp
 file.h
 fill-or-stroke.h
@@ -273,7 +179,7 @@ message-stack.cpp
 message-stack.h
 mod360.cpp
 mod360.h
-mod360-test.h
+#mod360-test.h
 modifier-fns.h
 MultiPrinter.h
 node-context.cpp
@@ -320,7 +226,7 @@ rect-context.h
 remove-last.h
 require-config.h
 round.h
-round-test.h
+#round-test.h
 rubberband.cpp
 rubberband.h
 satisfied-guide-cns.cpp
@@ -335,7 +241,7 @@ selection.cpp
 selection-describer.cpp
 selection-describer.h
 selection.h
-selfname.tpl
+#selfname.tpl
 seltrans.cpp
 seltrans.h
 seltrans-handles.cpp
@@ -450,7 +356,7 @@ sp-gradient.h
 sp-gradient-reference.cpp
 sp-gradient-reference.h
 sp-gradient-spread.h
-sp-gradient-test.h
+#sp-gradient-test.h
 sp-gradient-units.h
 sp-gradient-vector.h
 sp-guide-attachment.h
@@ -531,7 +437,7 @@ sp-string.cpp
 sp-string.h
 sp-style-elem.cpp
 sp-style-elem.h
-sp-style-elem-test.h
+#sp-style-elem-test.h
 sp-switch.cpp
 sp-switch.h
 sp-symbol.cpp
@@ -563,15 +469,15 @@ streq.h
 strneq.h
 style.cpp
 style.h
-style-test.cpp
-style-test.h
+#style-test.cpp
+#style-test.h
 svg-profile.h
 svg-view.cpp
 svg-view.h
 svg-view-widget.cpp
 svg-view-widget.h
 syseq.h
-test-helpers.h
+#test-helpers.h
 text-chemistry.cpp
 text-chemistry.h
 text-context.cpp
@@ -596,13 +502,89 @@ vanishing-point.cpp
 vanishing-point.h
 verbs.cpp
 verbs.h
-verbs-test.h
+#verbs-test.h
 version.cpp
 version.h
 zoom-context.cpp
 zoom-context.h\r
 ${ONLY_WIN}\r
 )\r
+# All folder with CMakeLists.txt files (excluding internal libraries)\r
+SET(srcfolders\r
+algorithms\r
+api\r
+bind\r
+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/param\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
+\r
+\r
+# All directories containing lists files that describe building internal libraries\r
+SET(libfolders
+2geom\r
+application\r
+#dialogs\r
+libavoid\r
+libcola\r
+libcroco\r
+libgdl\r
+libnr\r
+libnrtype\r
+libvpsc
+livarot\r
+)\r
+\r
+FOREACH(dirlist ${libfolders})\r
+  ADD_SUBDIRECTORY(${dirlist})\r
+ENDFOREACH(dirlist)\r
+\r
 \r
 # make executable for INKSCAPE\r
 ADD_EXECUTABLE(inkscape ${INKSCAPE_SRC})\r
index 501f1137515fac0e372cf0c204635a5d76ef260b..223301743a45219b682f29c2ab9f565ec28ead6a 100644 (file)
@@ -10,7 +10,7 @@ png-write.cpp
 stock-items.cpp
 unit-menu.cpp
 units.cpp
-units-test.cpp
+#units-test.cpp
 unit-tracker.cpp
 window.cpp
 sp-marshal.list