build.xml revision 7f43eabc54033ee929b618ac0a726a67f860a37b
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * Inkscape build file.
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * See buildtool.cpp for use.
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * Bob Jamison
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * Copyright (C) 2006-2008 Inkscape.org
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * This library is free software; you can redistribute it and/or
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * modify it under the terms of the GNU Lesser General Public
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * License as published by the Free Software Foundation; either
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * version 2.1 of the License, or (at your option) any later version.
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * This library is distributed in the hope that it will be useful,
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * but WITHOUT ANY WARRANTY; without even the implied warranty of
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * Lesser General Public License for more details.
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * You should have received a copy of the GNU Lesser General Public
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * License along with this library; if not, write to the Free Software
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler## P R O J E C T : I N K S C A P E
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler<project name="Inkscape" default="dist" basedir=".">
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <description>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler Build file for the Inkscape SVG editor. This file
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler was written for GTK-2.10 on Win32, but it should work
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler well for other types of builds with only minor adjustments.
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler Note that the default target is 'dist'. You can execute other
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler targets instead, by "btool {target}", like "btool compile", if
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler you want to save time.
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler </description>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- set global properties for this build -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- Use these settings for the native compiler -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <property name="devlibs" location="c:/devlibs"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- Use these settings for the cross compiler -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <property name="arch" value="i686-pc-mingw32-"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <property name="archutil" value="${arch}"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <property name="devlibs" location="/target"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- Extra properties -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler This is for package-config. With these two settings, pkg-config
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler queries can be as simple as ${pcc.packageName} for cflags, and
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ${pcl.packageName} for libs. Dependencies are calculated automatically.
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <property name="pkg-config-path" location="${devlibs}/lib/pkgconfig"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <property name="pkg-config-prefix" location="${devlibs}"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ## T A R G E T : I N I T
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler description=
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler "Do all preparatory tasks, like make directories and copy files">
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler tofile="${src}/helper/sp-marshal.h"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler tofile="${src}/helper/sp-marshal.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define INKSCAPE_VERSION "${version}"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #ifndef _CONFIG_H_
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define _CONFIG_H_
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #ifndef WIN32
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define WIN32
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler /*######################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ## This is for require-config.h, whose
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ## purpose I cannot fathom.
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ######################################*/
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define PACKAGE_TARNAME
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler /*######################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #### RESOURCE DIRECTORIES
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ######################################*/
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define INKSCAPE_DATADIR "."
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define PACKAGE_LOCALE_DIR "locale"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler /*######################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #### OTHER DEFINITIONS
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ######################################*/
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define GETTEXT_PACKAGE "inkscape"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define PACKAGE_STRING VERSION
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_GETOPT_H 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_STRING_H 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_LIBINTL_H 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_MALLOC_H 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_STDLIB_H 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_SYS_STAT_H 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_INTTYPES_H 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define ENABLE_LCMS 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define ENABLE_NLS 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_BIND_TEXTDOMAIN_CODESET 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler /* keep binreloc off */
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define BR_PTHREADS 0
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #undef ENABLE_BINRELOC
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler /* CairoPDF options */
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_CAIRO_PDF 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define PANGO_ENABLE_ENGINE 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define RENDER_WITH_PANGO_CAIRO 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_GTK_WINDOW_FULLSCREEN 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler /* internal interpreter */
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define WITH_PYTHON 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler /* shared whiteboard */
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define WITH_INKBOARD 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_SSL 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler /* use poppler for pdf import? */
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_POPPLER 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define HAVE_POPPLER_CAIRO 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler /* do we want bitmap manipulation? */
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define WITH_IMAGE_MAGICK 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler /* Allow reading WordPerfect? */
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #define WITH_LIBWPG 1
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler #endif /* _CONFIG_H_ */
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ## T A R G E T : T O U C H A B O U T
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler description="update the modification time of aboutdialog.cpp">
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- not good <touch file="${src}/ui/dialog/aboutdialog.cpp"/> -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- better -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <delete file="${build}/obj/ui/dialog/aboutdialog.o"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ## T A R G E T : C X X T E S T
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler description="generate test files" >
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- Generate CxxTest files -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler </cxxtestpart>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler </cxxtestpart>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler </cxxtestpart>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler </cxxtestpart>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler </cxxtestpart>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler </cxxtestpart>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler </cxxtestpart>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <cxxtestroot command="python ${cxxtest}/cxxtestgen.py"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler template="${src}/selfname.tpl">
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler </cxxtestroot>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ## T A R G E T : C O M P I L E
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler description="compile the source to .o" >
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- Compile from source to build -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler destdir="${build}/obj"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler continueOnError="true"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler refreshCache="${refresh}">
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- THINGS TO EXCLUDE -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!--<exclude name="test-main.cpp"/>-->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!--<exclude name="test-src.cpp"/>-->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="extension/implementation/plugin.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- exclude name="inkview.cpp"/-->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!--<exclude name="libnr/test-nr.cpp"/>-->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="libnr/nr-compose-reference.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!--<exclude name="svg/test-svg.cpp"/>-->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!--<exclude name="xml/test-xml.cpp"/>-->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!--JABBER-->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!--WHITEBOARD-->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="ui/dialog/whiteboard-connect.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="ui/dialog/whiteboard-sharewithchat.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="ui/dialog/whiteboard-sharewithuser.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="dialogs/whiteboard-connect-dialog.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="dialogs/whiteboard-common-dialog.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="dialogs/whiteboard-sharewithchat-dialog.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="dialogs/whiteboard-sharewithuser-dialog.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="jabber_whiteboard/node-tracker.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="jabber_whiteboard/node-utilities.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!--OVERLAP-->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="removeoverlap/placement_SolveVPSC.h"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler </excludeinc>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler -mms-bitfields
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler -DVERSION=\"${version}\"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler -DHAVE_CONFIG_H
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler -D_INTL_REDIRECT_INLINE
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler -DPOPPLER_NEW_GFXFONT <!-- poppler changed the api for 0.8.3 -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler -I${devlibs}/include
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- GTK / GTKMM -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- OTHER -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler -I${cxxtest}
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- PERL -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- -Wno-comment -I${devlibs}/perl/lib/CORE -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- PYTHON -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- JAVA -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler -I${src}/bind/javainc -I${src}/bind/javainc/win32
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ## T A R G E T : L I B
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler description="create a static library">
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler file="${build}/libinkscape.a">
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <!-- CxxTest -->
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler </staticlib>
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ## T A R G E T : I 1 8 N
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler description="compile gettext .po files to .mo">
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ## T A R G E T : L I N K
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ########################################################################
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler description="link objects and library to create executable">
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler out="${build}/inkres.o">
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler --include-dir=${src}
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler <link command="${arch}g++" out="${build}/inkscape.exe"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler stripcommand="${archutil}strip"
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler objcopycommand="${archutil}objcopy">
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler -L${devlibs}/lib
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
f6df6236fcf18524e049bba12b69704af32eff90Josh Andler ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
${pcl.lcms}
${pcl.gsl}
file="${src}/inkview.rc"
out="${build}/inkviewres.o">
-lpoppler-cairo -lpoppler-glib -lpoppler.dll
${pcl.lcms}
${pcl.gsl}
<!--<copy file="${devlibs}/bin/libexpat.dll" tofile="${dist}/xmlparse.dll"/>-->