|
|
@ -113,7 +113,7 @@ def detect_kde(env):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
print RED + "moc was not found - set QTDIR or put it in your PATH ?" + NORMAL
|
|
|
|
print RED + "moc was not found - set QTDIR or put it in your PATH ?" + NORMAL
|
|
|
|
env.Exit(1)
|
|
|
|
env.Exit(1)
|
|
|
|
env['QT_TQMOC'] = moc
|
|
|
|
env['QT_MOC'] = moc
|
|
|
|
|
|
|
|
|
|
|
|
## check for the qt and kde includes
|
|
|
|
## check for the qt and kde includes
|
|
|
|
print "Checking for the qt includes : ",
|
|
|
|
print "Checking for the qt includes : ",
|
|
|
@ -326,7 +326,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
|
|
|
|
# h file with the Q_OBJECT macro found -> add .moc or _moc.cpp file
|
|
|
|
# h file with the Q_OBJECT macro found -> add .moc or _moc.cpp file
|
|
|
|
moc_cpp = None
|
|
|
|
moc_cpp = None
|
|
|
|
|
|
|
|
|
|
|
|
if env.has_key('NOTQMOCSCAN'):
|
|
|
|
if env.has_key('NOMOCSCAN'):
|
|
|
|
moc_cpp = env.Moc(h)
|
|
|
|
moc_cpp = env.Moc(h)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
reg = '\n\s*#include\s*("|<)'+splitext(cpp.name)[0]+'.moc("|>)'
|
|
|
|
reg = '\n\s*#include\s*("|<)'+splitext(cpp.name)[0]+'.moc("|>)'
|
|
|
@ -369,7 +369,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
|
|
|
|
('QTLIBPATH', 'path to the qt libraries'),
|
|
|
|
('QTLIBPATH', 'path to the qt libraries'),
|
|
|
|
('QTINCLUDEPATH', 'path to the qt includes'),
|
|
|
|
('QTINCLUDEPATH', 'path to the qt includes'),
|
|
|
|
('QT_UIC', 'moc directory'),
|
|
|
|
('QT_UIC', 'moc directory'),
|
|
|
|
('QT_TQMOC', 'moc executable command'),
|
|
|
|
('QT_MOC', 'moc executable command'),
|
|
|
|
('QTPLUGINS', 'uic executable command'),
|
|
|
|
('QTPLUGINS', 'uic executable command'),
|
|
|
|
('KDEDIR', 'root of kde directory'),
|
|
|
|
('KDEDIR', 'root of kde directory'),
|
|
|
|
('KDELIBPATH', 'path to the kde libs'),
|
|
|
|
('KDELIBPATH', 'path to the kde libs'),
|
|
|
@ -412,8 +412,8 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
|
|
|
|
env['QT_UICIMPLPREFIX'] = ''
|
|
|
|
env['QT_UICIMPLPREFIX'] = ''
|
|
|
|
env['QT_UICIMPLSUFFIX'] = '.cpp'
|
|
|
|
env['QT_UICIMPLSUFFIX'] = '.cpp'
|
|
|
|
|
|
|
|
|
|
|
|
env['QT_TQMOCHPREFIX'] = ''
|
|
|
|
env['QT_MOCHPREFIX'] = ''
|
|
|
|
env['QT_TQMOCHSUFFIX'] = '.moc'
|
|
|
|
env['QT_MOCHSUFFIX'] = '.moc'
|
|
|
|
env['KDE_KCFG_IMPLPREFIX'] = ''
|
|
|
|
env['KDE_KCFG_IMPLPREFIX'] = ''
|
|
|
|
env['KDE_KCFG_IMPL_HSUFFIX'] = '.h'
|
|
|
|
env['KDE_KCFG_IMPL_HSUFFIX'] = '.h'
|
|
|
|
env['KDE_KCFG_IMPL_CSUFFIX'] = '.cpp'
|
|
|
|
env['KDE_KCFG_IMPL_CSUFFIX'] = '.cpp'
|
|
|
@ -427,7 +427,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
|
|
|
|
inc_moc = '#include "%s"\n' % target[2].name
|
|
|
|
inc_moc = '#include "%s"\n' % target[2].name
|
|
|
|
comp_h = '$QT_UIC $QT_UIC_HFLAGS -o %s %s' % (target[0].path, source[0].path)
|
|
|
|
comp_h = '$QT_UIC $QT_UIC_HFLAGS -o %s %s' % (target[0].path, source[0].path)
|
|
|
|
comp_c = '$QT_UIC $QT_UIC_CFLAGS -impl %s %s' % (target[0].path, source[0].path)
|
|
|
|
comp_c = '$QT_UIC $QT_UIC_CFLAGS -impl %s %s' % (target[0].path, source[0].path)
|
|
|
|
comp_moc = '$QT_TQMOC -o %s %s' % (target[2].path, target[0].path)
|
|
|
|
comp_moc = '$QT_MOC -o %s %s' % (target[2].path, target[0].path)
|
|
|
|
|
|
|
|
|
|
|
|
ret = env.Execute(comp_h)
|
|
|
|
ret = env.Execute(comp_h)
|
|
|
|
if ret:
|
|
|
|
if ret:
|
|
|
@ -461,8 +461,8 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
|
|
|
|
if len(target) < 3:
|
|
|
|
if len(target) < 3:
|
|
|
|
# third target is .moc file
|
|
|
|
# third target is .moc file
|
|
|
|
target.append(adjustixes(bs,
|
|
|
|
target.append(adjustixes(bs,
|
|
|
|
env.subst('$QT_TQMOCHPREFIX'),
|
|
|
|
env.subst('$QT_MOCHPREFIX'),
|
|
|
|
env.subst('$QT_TQMOCHSUFFIX')))
|
|
|
|
env.subst('$QT_MOCHSUFFIX')))
|
|
|
|
return target, source
|
|
|
|
return target, source
|
|
|
|
|
|
|
|
|
|
|
|
UIC_BUILDER = Builder(
|
|
|
|
UIC_BUILDER = Builder(
|
|
|
@ -472,15 +472,15 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
|
|
|
|
src_suffix = '.ui')
|
|
|
|
src_suffix = '.ui')
|
|
|
|
|
|
|
|
|
|
|
|
## moc file processing
|
|
|
|
## moc file processing
|
|
|
|
env['QT_TQMOCCOM'] = ('$QT_TQMOC -o ${TARGETS[0]} $SOURCE')
|
|
|
|
env['QT_MOCCOM'] = ('$QT_MOC -o ${TARGETS[0]} $SOURCE')
|
|
|
|
|
|
|
|
|
|
|
|
TQMOC_BUILDER = Builder(
|
|
|
|
MOC_BUILDER = Builder(
|
|
|
|
action = '$QT_TQMOCCOM',
|
|
|
|
action = '$QT_MOCCOM',
|
|
|
|
suffix = '.moc',
|
|
|
|
suffix = '.moc',
|
|
|
|
src_suffix = '.h')
|
|
|
|
src_suffix = '.h')
|
|
|
|
|
|
|
|
|
|
|
|
TQMOCCPP_BUILDER = Builder(
|
|
|
|
MOCCPP_BUILDER = Builder(
|
|
|
|
action = '$QT_TQMOCCOM',
|
|
|
|
action = '$QT_MOCCOM',
|
|
|
|
suffix = '_moc.cpp',
|
|
|
|
suffix = '_moc.cpp',
|
|
|
|
src_suffix = '.h')
|
|
|
|
src_suffix = '.h')
|
|
|
|
|
|
|
|
|
|
|
@ -576,8 +576,8 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
|
|
|
|
|
|
|
|
|
|
|
|
## register the builders
|
|
|
|
## register the builders
|
|
|
|
env['BUILDERS']['Uic'] = UIC_BUILDER
|
|
|
|
env['BUILDERS']['Uic'] = UIC_BUILDER
|
|
|
|
env['BUILDERS']['Moc'] = TQMOC_BUILDER
|
|
|
|
env['BUILDERS']['Moc'] = MOC_BUILDER
|
|
|
|
env['BUILDERS']['Moccpp'] = TQMOCCPP_BUILDER
|
|
|
|
env['BUILDERS']['Moccpp'] = MOCCPP_BUILDER
|
|
|
|
env['BUILDERS']['Dcop'] = DCOP_BUILDER
|
|
|
|
env['BUILDERS']['Dcop'] = DCOP_BUILDER
|
|
|
|
env['BUILDERS']['Kcfg'] = KCFG_BUILDER
|
|
|
|
env['BUILDERS']['Kcfg'] = KCFG_BUILDER
|
|
|
|
env['BUILDERS']['LaFile'] = LA_BUILDER
|
|
|
|
env['BUILDERS']['LaFile'] = LA_BUILDER
|
|
|
|