|
From: <pat...@us...> - 2007-06-25 22:34:46
|
Revision: 594
http://svn.sourceforge.net/xml-cppdom/?rev=594&view=rev
Author: patrickh
Date: 2007-06-25 15:34:48 -0700 (Mon, 25 Jun 2007)
Log Message:
-----------
Improve things a little bit with Flagpoll on Windows by setting up the use
of automatic linking. There is still a problem where too many cppdom*.fpc
files are generated, however. Instead of putting the variation among
optimized/debug/hybrid and static/shared into one architecture-specific file,
that information is spread out across many files.
Modified Paths:
--------------
trunk/SConstruct
Modified: trunk/SConstruct
===================================================================
--- trunk/SConstruct 2007-06-25 22:00:32 UTC (rev 593)
+++ trunk/SConstruct 2007-06-25 22:34:48 UTC (rev 594)
@@ -205,6 +205,19 @@
elif "x64" == combo["arch"]:
arch = "x86_64"
+ cppdom_cxxflags = ''
+ cppdom_libs = "-l%s" % cppdom_shared_libname
+
+ # Use automatic linking on Windows.
+ if GetPlatform() == 'win32':
+ cppdom_libs = ''
+ cppdom_cxxflags = '/DCPPDOM_AUTO_LINK'
+
+ if "debug" in combo["type"] or "hybrid" in combo["type"]:
+ cppdom_cxxflags += ' /DCPPDOM_DEBUG'
+ if "shared" in combo["libtype"]:
+ cppdom_cxxflags += ' /DCPPDOM_DYN_LINK'
+
# - Define a builder for the cppdom.fpc file
# ------------------ Build -config and .pc files ----------------- #
# Build up substitution map
@@ -212,20 +225,25 @@
'@provides@' : provides,
'@prefix@' : inst_paths['base'],
'@exec_prefix@' : '${prefix}',
- '@cppdom_cxxflags@' : '',
+ '@cppdom_cxxflags@' : cppdom_cxxflags,
'@includedir@' : inst_paths['include'],
'@cppdom_extra_cxxflags@' : '',
'@cppdom_extra_include_dirs@' : '',
- '@cppdom_libs@' : "-l%s" % cppdom_shared_libname,
+ '@cppdom_libs@' : cppdom_libs,
'@libdir@' : inst_paths['lib'],
'@arch@' : arch,
'@version@' : cppdom_version_str
}
# Setup the builder for cppdom.fpc
+ # XXX: This generates multiple cppdom*.fpc files instead of putting all
+ # the variation of debug/optimized/hybrid and static/shared into one
+ # architecture-specific file!
name_parts = ['cppdom',cppdom_version_str,arch]
if combo["type"] != "optimized":
name_parts.append(combo["type"])
+ if GetPlatform() == 'win32':
+ name_parts.append(combo["libtype"])
pc_filename = "-".join(name_parts) + ".fpc"
cppdom_pc = build_env.SubstBuilder(pj(inst_paths['flagpoll'],
pc_filename),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|