env['ENV']['PKG_CONFIG_PATH'] = os.environ.get('PKG_CONFIG_PATH')
env['TOP_SRC_DIR'] = Dir('.').abspath
+# 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']:
+ env['CC'] = 'g++'
+ env['LINK'] = 'g++'
+
#
# frontend, mode, BUILDDIR and LOCALLIBPATH=BUILDDIR/libs
#
env['QT_LIB'] = ['QtCore4', 'QtGui4', 'Qt3Support4']
else:
env['QT_LIB'] = ['QtCore', 'QtGui', 'Qt3Support']
- env['EXTRA_LIBS'] = env['QT_LIB']
+ env['EXTRA_LIBS'] = [x for x in env['QT_LIB']]
except:
print "Can not locate qt tools"
print "What I get is "
print " QTDIR: ", env['QTDIR']
+if platform_name == 'win32':
+ env['SYSTEM_LIBS'] = ['shlwapi', 'zlib1']
+elif platform_name == 'cygwin':
+ env['SYSTEM_LIBS'] = ['shlwapi', 'z']
+else:
+ env['SYSTEM_LIBS'] = ['z']
+
#
# Build parameters CPPPATH etc
#
'QtUiTools',
'QtUiTools_debug',
]
+ # under windows, they are named QtCore4 etc
+ validModules += [x+'4' for x in validModules]
+ pclessModules += [x+'4' for x in pclessModules]
invalidModules=[]
for module in modules:
if module not in validModules :
# Full author contact details are available in file CREDITS.
Import('env')
+import os, sys
print "Entering src/frontends/qt3"
QVSpaceDialogBase.ui
QWrapDialogBase.ui
''')
+
moc_files = Split('''
BulletsModule.C
socket_callback.C
validators.C
''')
-
+
+# under windows, because of the .C/.c confusion
+# moc_files are not moced automatically.
+# I am doing it manually here, until lyx changes
+# file extension from .C to .cpp
+moced_files = []
+if os.name == 'nt' or sys.platform == 'cygwin':
+ moced_files = [qtenv.Moc(x.replace('.C', '.h')) for x in moc_files]
+
qt3 = qtenv.StaticLibrary(
target = '$LOCALLIBPATH/qt3',
source = Split('''
qscreen.C
qt_helpers.C
''') +
- moc_files +
+ moc_files + moced_files +
['ui/' + x for x in ui_files]
)