Skip to content

vancegroup-mirrors/cppdom

Repository files navigation

see COPYING for the license (LGPL)

Dependencies
============
- Reasonably compliant C++ compiler (gcc 3.x, vc 7.1, etc)
- Boost library: See www.boost.org for details and downloads
- CppUnit (optional for test suite): See cppunit.sf.net
- (optional) SConsAddons - Addon library for the build system.  https://realityforge.vrsource.org/SconsAddons

Building
========
CppDom uses the scons build system.  You can download scons from www.scons.org.

We also use the SconsAddons library (see above).  It is included in the source
tree or you can add its source directory in your PYTHONPATH to build.

ex: https://realityforge.vrsource.org/svn/scons-addons/trunk/scons-addons

PYTHONPATH=/home/username/scons-addons/src

NOTE: In the future we hope to use third party branches or svn:externals to 
remove the need to download this separately.

Once you have both of these, the follow steps should be all you need.

Please see 'scons --help' for a list of options for specifying where the
dependencies are located.

type 'scons' to build cppdom shared lib.
type 'scons install' to install on the system
type 'scons install prefix=$HOME/software' to install in your account

Windows
=======

CppDOM can be compiled with Visual C++ 6.0 and newer. However, SCons tries to
be smart and pick the version of Visual C++ that it thinks you should use
(always--or almost always--the newest version). To override this, use the
MSVS_VERSION command line option. For example, to force compilation with
Visual C++ 7.0 (from Visual Studio .NET 2002), run the following:

   scons MSVS_VERSION=7.0

Let's say we want to use Visual C++ 8.0 (from Visual Studio 8) instead. In
that case, run the following:

   scons MSVS_VERSION=8.0

If there is only one version of Visual Studio installed, SCons will find it,
and using the MSVS_VERSION argument is unnecessary.

64-bit Windows
==============

To build a 64-bit version of CppDOM on Windows, Visual Studio 2005 (also
known as Visual Studio 8) must be used, and it must be run on a 64-bit
Windows installation. The trick, however, is that the 32-bit version of
Python must be used. Otherwise, SCons will not find the Visual Studio
installation because it looks in the wrong place in the Registry and in
"C:\Program Files\Microsoft Visual Studio 8" instead of in
"C:\Program Files (x86)\Microsoft Visual Studio 8".

So, to build both the 32-bit and the 64-bit versions of CppDOM, run the
following:

   scons MSVS_VERSION=8.0

To build only the 64-bit version, run the following:

   scons MSVS_VERSION=8.0 var_arch=x64

Mac OS X
========

On Mac OS X, the build may auto-detect that it can build multiple
architectures (not necessarily universal binaries), but this case is not
currently handled well. SCons will complain that there are multiple ways to
build the same target and exit with an error. To work around this, specify
the desired architecture explicitly (pass var_arch=ppc, var_arch=ia32, or
var_arch=ppc64 on the scons command line) or build a universal binary (see
below).

Universal Binaries
==================

To build the CppDOM libraries as univeral binaries (Mac OS X only), use the
following command:

   scons darwin_universal=yes var_arch=universal var_type=optimized \
         darwin_sdk=/Developer/SDKs/MacOSX10.4u.sdk

An alternate platform SDK can be used by using the appropriate value with
the darwin_sdk command line arcument.