Code

Cmake: more fixes plus a patch for OSX paths by Henrik Gustafsson
[inkscape.git] / build.xml
index e76307b2c8520c3d538f798bd2753a6da6972432..f16c1486c5a672d82be5df2ee4dac10b0b4c1f69 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -53,6 +53,7 @@
   <property name="arch"          value="mingw32-"/>
   <property name="archutil"      value=""/>
   <property name="devlibs"       location="${env.DEVLIBS_PATH}"/>
+  <property name="mingw_bin"     location="${env.MINGW_BIN}"/>
   <property name="cxxtest"       location="cxxtest"/>
   <!-- -->
 
@@ -97,7 +98,7 @@
           tofile="${src}/helper/sp-marshal.cpp"/>
           
     <makefile file="inkscape_version.h">
-        #define INKSCAPE_VERSION "${version}"
+        #define INKSCAPE_VERSION "${version}, revision ${svn.revision}"
     </makefile>
     <makefile file="config.h">
         #ifndef _CONFIG_H_
         #define HAVE_STDLIB_H                 1
         #define HAVE_SYS_STAT_H               1
         #define HAVE_INTTYPES_H               1
+        #define HAVE_OPENMP                   1
 
         #define ENABLE_LCMS                   1
 
         /* Do we support SVG Fonts? */
         #define ENABLE_SVG_FONTS              1
 
+        /* Do we want experimental, unsupported, unguaranteed, etc., LivePathEffects enabled? */
+        // #define LPE_ENABLE_TEST_EFFECTS    1
+
         #endif /* _CONFIG_H_ */
     </makefile>
   </target>
   ########################################################################
   -->
   <target name="touchabout"
-      description="update the modification time of aboutdialog.cpp">
-    <!-- not good <touch file="${src}/ui/dialog/aboutdialog.cpp"/> -->
+      description="update the modification time of aboutbox.cpp">
+    <!-- not good <touch file="${src}/ui/dialog/aboutbox.cpp"/> -->
     <!-- better -->
-    <delete file="${build}/obj/ui/dialog/aboutdialog.o"/>
+    <delete file="${build}/obj/ui/dialog/aboutbox.o"/>
+    <delete file="inkscape_version.h"/>
   </target>
 
 
             <include name="dir-util-test.h"/>
             <include name="extract-uri-test.h"/>
             <include name="mod360-test.h"/>
+            <include name="preferences-test.h"/>
             <include name="round-test.h"/>
             <include name="sp-gradient-test.h"/>
             <include name="sp-style-elem-test.h"/>
     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
                  out="${src}/display/test-display.cpp">
         <fileset dir="${src}/display">
-            <include name="bezier-utils-test.h"/>
             <include name="curve-test.h"/>
         </fileset>
     </cxxtestpart>
             <include name="svg-color-test.h"/>
             <include name="svg-length-test.h"/>
             <include name="svg-path-geom-test.h"/>
-            <include name="svg-path-nr-test.h"/>
         </fileset>
     </cxxtestpart>
     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
     </cxxtestpart>
     <cxxtestroot command="python ${cxxtest}/cxxtestgen.py" 
                  out="${src}/test-main.cpp"
-                 template="${src}/selfname.tpl">
+                 template="${src}/cxxtest-template.tpl">
         <fileset dir="${src}">
             <include name="MultiPrinter.h"/>
             <include name="PylogFormatter.h"/>
             <exclude name="deptool.cpp"/>
             <!--<exclude name="test-main.cpp"/>-->
             <!--<exclude name="test-src.cpp"/>-->
+            <exclude name="display/test-display.cpp"/>
             <exclude name="display/testnr.cpp"/>
-            <exclude name="display/bezier-utils-test.cpp"/>
             <exclude name="dom/work/.*"/>
             <exclude name="dom/odf/SvgOdg.cpp"/>
             <exclude name="extension/api.cpp"/>
             <!--<exclude name="svg/test-svg.cpp"/>-->
             <exclude name="svg/test-svg-main.cpp"/>
             <exclude name="svg/test-stubs.cpp"/>
-            <exclude name="utest/.*"/>
             <exclude name="util/list-container-test.cpp"/>
             <exclude name="widgets/test-widgets.cpp"/>
             <exclude name="xml/quote-test.cpp"/>
             <exclude name="xml/repr-action-test.cpp"/>
-            <!--<exclude name="xml/test-xml.cpp"/>-->
-            <exclude name="xml/test-xml-main.cpp"/>
+            <exclude name="xml/test-xml.cpp"/>
+            <!--<exclude name="xml/test-xml-main.cpp"/>-->
             <exclude name="io/streamtest.cpp"/>
             <!--JABBER-->
             <exclude name="pedro/pedrogui.cpp"/>
             -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
             -O2
             -mms-bitfields
+            -fopenmp
         </flags>
         <defines>
             -DVERSION=\"${version}\"
               objcopycommand="${archutil}objcopy">
        <flags>
            -mwindows
+           -mthreads
        </flags>
        <fileset dir="${build}">
            <include name="inkres.o"/>
            <include name="obj/winmain.o"/>
            <include name="libinkscape.a"/>
        </fileset>
+       <!-- WARNING: If you change these libraries, don't forget to change them for inkview and cxxtests below as well! -->
        <libs>
            -L${devlibs}/lib
            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
            -lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
            -lgc
            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
+           -lgomp -lpthreadGC2
        </libs>
     </link>
   </target>
               objcopycommand="${archutil}objcopy">
        <flags>
            -mwindows
+           -mthreads
        </flags>
        <fileset dir="${build}">
            <include name="inkviewres.o"/>
            -lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
            -lgc
            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
+           -lgomp -lpthreadGC2
        </libs>
     </link>
   </target>
               stripcommand="${archutil}strip"
               objcopycommand="${archutil}objcopy">
        <flags>
+           -mthreads
        </flags>
        <fileset dir="${build}">
            <include name="obj/test-main.o"/>
            -lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
            -lgc
            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
+           -lgomp -lpthreadGC2
        </libs>
     </link>
   </target>
     <copy todir="${dist}" file="${devlibs}/bin/libpopt-0.dll"/>
     <copy todir="${dist}" file="${devlibs}/bin/liblcms-1.dll"/>
     <copy todir="${dist}" file="${devlibs}/bin/intl.dll"/>
+    <copy todir="${dist}" file="${devlibs}/bin/pthreadGC2.dll"/>
     <copy file="${devlibs}/bin/intl.dll" tofile="${dist}/libintl-2.dll"/>
+    <!-- MINGW dll needed, I think for openmp support  -->
+    <copy todir="${dist}" file="${mingw_bin}/mingwm10.dll"/>
 
     <!-- MSGFMT files -->
     <copy todir="${dist}">
     <delete dir="${dist}"/>
     <delete file="build.dep"/>
     <delete file="config.h"/>
+    <delete file="inkscape_version.h"/>
 
     <delete file="${src}/test-main.cpp"/>
     <delete file="${src}/test-src.cpp"/>