You are going to be pleased Bo, this is my first patch for Scons and I
haven't even read Python tutorial ;-)
It turned out I don't have to implement the mingw option because mingw
gcc already knows about where its includes and libs lye.
In fact, I just have to:
scons qt_dir=d:/program/Qt/4.1
And everything is compiled correctly.
Can I commit Bo?
Abdel.
---------------------------------
SVN log.
* Get rid of Qt3Support linking
* revert to -lz instead -lzlib1 (I think Enrico was right about
libraries ordering and -lz at the end of linking command works fine
under mingw).
* remove win32 target from gcc/g++ replacement hack for cygwin
Index: SConstruct
===================================================================
--- SConstruct (revision 13823)
+++ SConstruct (working copy)
@@ -12,7 +12,7 @@
# This is a scons based building system for lyx, you can use it as follows:
# (after of course installation of scons from www.scons.org)
#
-# scons [frontend=qt3|gt4] [boost=included|auto] ...
+# scons [frontend=qt3|qt4] [boost=included|auto] ...
#
# Where:
# * use scons -h for details about parameters
@@ -302,7 +302,7 @@
# under windows, scons is confused by .C/.c and uses gcc instead of
# g++. I am forcing the use of g++ here. This is expected to change
# after lyx renames all .C files to .cpp
-if platform_name in ['win32', 'cygwin']:
+if platform_name in ['cygwin']:
env['CC'] = 'g++'
env['LINK'] = 'g++'
@@ -431,7 +431,7 @@
# third: try to look up the path
if not succ:
succ = True
- for lib in ['QtCore', 'QtGui', 'Qt3Support']:
+ for lib in ['QtCore', 'QtGui']:
# windows version has something like QtGui4 ...
if not (os.path.isfile(os.path.join(env.subst('$QT_LIB_PATH'), 'lib%s.a'
% lib)) or \
os.path.isfile(os.path.join(env.subst('$QT_LIB_PATH'), 'lib%s4.a' %
lib))):
@@ -734,9 +734,9 @@
# local qt4 toolset from
# http://www.iua.upf.es/~dgarcia/Codders/sconstools.html
if platform_name == "win32":
- env['QT_LIB'] = ['QtCore4', 'QtGui4', 'Qt3Support4']
+ env['QT_LIB'] = ['QtCore4', 'QtGui4']
else:
- env['QT_LIB'] = ['QtCore', 'QtGui', 'Qt3Support']
+ env['QT_LIB'] = ['QtCore', 'QtGui']
env['EXTRA_LIBS'] += [x for x in env['QT_LIB']]
except:
print "Can not locate qt tools"
@@ -744,7 +744,7 @@
print " QTDIR: ", env['QTDIR']
if platform_name == 'win32':
- env['SYSTEM_LIBS'] = ['shlwapi', 'zlib1']
+ env['SYSTEM_LIBS'] = ['shlwapi', 'z']
elif platform_name == 'cygwin':
env['SYSTEM_LIBS'] = ['shlwapi', 'z']
else: