]> git.lyx.org Git - features.git/blob - src/frontends/qt4/SConscript
Some fixes to the scons-based building sytem, from Bo Peng (ben.bob@gmail.com)
[features.git] / src / frontends / qt4 / SConscript
1 # vi:filetype=python:expandtab:tabstop=2:shiftwidth=2
2
3 # file SConscript
4 #
5 # This file is part of LyX, the document processor.
6 # Licence details can be found in the file COPYING.
7
8 # \author Bo Peng
9 # Full author contact details are available in file CREDITS.
10
11
12 Import('env')
13
14 print "Entering src/frontends/qt4"
15
16 qtenv = env.Copy()
17
18 # local qt4 toolset from 
19 # http://www.iua.upf.es/~dgarcia/Codders/sconstools.html
20 #
21 # NOTE: I have to patch qt4.py since it does not automatically
22 # process .C file!!! (add to cxx_suffixes )
23
24 qtenv.Tool('qt4', ['$TOP_SRC_DIR/config'])
25 qtenv.EnableQt4Modules(env['QT_LIB'], debug = False)
26
27 qtenv.Append(CPPPATH = [
28   '#$BUILDDIR', 
29   '#$BUILDDIR/frontends', 
30   '#$BUILDDIR/images', 
31   '#$BUILDDIR/frontends/controllers',
32   '$QT_INC_PATH',
33   '$QT_INC_PATH/Qt', 
34   '$QT_INC_PATH/QtCore', 
35   '$QT_INC_PATH/QtGui', 
36   '$QT_INC_PATH/Qt3Support', 
37   '.']
38 )
39
40 # FIXME: replace by something from pkg_config
41 qtenv.Append(CCFLAGS = [
42   '-DHAVE_CONFIG_H',
43   '-DQT_CLEAN_NAMESPACE',
44   '-DQT_GENUINE_STR',
45   '-DQT_NO_STL',
46   '-DQT3_SUPPORT',
47   '-Winvalid-pch']
48 )
49
50 ui_files = Split('''
51   BiblioUi
52   BranchesUi
53   BulletsUi
54   TextLayoutUi
55   LanguageUi
56   LaTeXUi
57   MarginsUi
58   NumberingUi
59   MathsUi
60   PageLayoutUi
61   PreambleUi
62   QAboutUi
63   QAskForTextUi
64   QBibitemUi
65   QBibtexUi
66   QBibtexAddUi
67   QBoxUi
68   QBranchUi
69   QChangesUi
70   QCharacterUi
71   QCitationUi
72   QCitationFindUi
73   QDelimiterUi
74   QDocumentUi
75   QErrorListUi
76   QERTUi
77   QExternalUi
78   QFloatUi
79   QGraphicsUi
80   QIncludeUi
81   QIndexUi
82   QLogUi
83   QViewSourceUi
84   QMathUi
85   QMathMatrixUi
86   QNoteUi
87   QParagraphUi
88   QPrefAsciiUi
89   QPrefColorsUi
90   QPrefConvertersUi
91   QPrefCopiersUi
92   QPrefCygwinPathUi
93   QPrefDateUi
94   QPrefDisplayUi
95   QPrefFileformatsUi
96   QPrefIdentityUi
97   QPrefKeyboardUi
98   QPrefLanguageUi
99   QPrefLatexUi
100   QPrefPathsUi
101   QPrefPrinterUi
102   QPrefScreenFontsUi
103   QPrefsUi
104   QPrefSpellcheckerUi
105   QPrefUi
106   QPrintUi
107   QRefUi
108   QSearchUi
109   QSendtoUi
110   QShowFileUi
111   QSpellcheckerUi
112   QTabularCreateUi
113   QTabularUi
114   QTexinfoUi
115   QThesaurusUi
116   QTocUi
117   QURLUi
118   QVSpaceUi
119   QWrapUi
120 ''')
121
122 moc_files = Split('''
123   BulletsModule.C
124   emptytable.C
125   FileDialog_private.C
126   floatplacement.C
127   iconpalette.C
128   lengthcombo.C
129   panelstack.C
130   QAboutDialog.C
131   QBibitemDialog.C
132   QBibtexDialog.C
133   QBoxDialog.C
134   QBranchDialog.C
135   QBranches.C
136   QChangesDialog.C
137   QCharacterDialog.C
138   QCitationDialog.C
139   QCommandBuffer.C
140   QCommandEdit.C
141   QDelimiterDialog.C
142   QDocumentDialog.C
143   QErrorListDialog.C
144   QERTDialog.C
145   QExternalDialog.C
146   QFloatDialog.C
147   QGraphicsDialog.C
148   QIncludeDialog.C
149   QIndexDialog.C
150   QLAction.C
151   QLogDialog.C
152   QViewSourceDialog.C
153   QViewSource.C
154   QLMenubar.C
155   QLPopupMenu.C
156   QLPrintDialog.C
157   QMathDialog.C
158   QMathMatrixDialog.C
159   QNoteDialog.C
160   QParagraphDialog.C
161   QPrefsDialog.C
162   QRefDialog.C
163   QSearchDialog.C
164   QSendtoDialog.C
165   qsetborder.C
166   QShowFileDialog.C
167   QSpellcheckerDialog.C
168   QDialogView.C
169   QTabularCreateDialog.C
170   QTabularDialog.C
171   QTexinfoDialog.C
172   QThesaurusDialog.C
173   TocModel.C
174   QTocDialog.C
175   QtView.C
176   QURLDialog.C
177   QVSpaceDialog.C
178   QWorkArea.C
179   QWrapDialog.C
180   QLToolbar.C
181   socket_callback.C
182   validators.C
183 ''')
184
185 #
186 # Compile resources
187 #
188 resources = [qtenv.Uic4('ui/' + x) for x in ui_files]
189
190 source_files = Split('''
191   QDialogView.C 
192   Alert_pimpl.C 
193   Dialogs.C 
194   FileDialog.C 
195   LyXKeySymFactory.C 
196   LyXScreenFactory.C 
197   QLMenubar.C
198   qtTimeout.C
199   QAbout.C
200   QBibitem.C
201   QBibtex.C
202   QBox.C
203   QBranch.C
204   QBranches.C
205   QChanges.C
206   QCharacter.C
207   QCitation.C
208   QDocument.C
209   QErrorList.C
210   QERT.C
211   QExternal.C
212   QFloat.C
213   QGraphics.C
214   QInclude.C
215   QIndex.C
216   QLAction.C
217   QLImage.C
218   QLog.C
219   QViewSource.C
220   QLPainter.C
221   QLyXKeySym.C
222   QMath.C
223   QNote.C
224   QParagraph.C
225   QPrefs.C
226   QPrint.C
227   QRef.C
228   QSearch.C
229   QSendto.C
230   QShowFile.C
231   QSpellchecker.C
232   QTabular.C
233   QTabularCreate.C
234   QTexinfo.C
235   QThesaurus.C
236   QToc.C
237   QURL.C
238   QVSpace.C
239   QWorkArea.C
240   QWrap.C
241   Qt2BC.C
242   WorkAreaFactory.C 
243   checkedwidgets.C
244   lyx_gui.C 
245   lcolorcache.C 
246   panelstack.C 
247   qfontexample.C 
248   qfont_loader.C 
249   qfont_metrics.C 
250   qscreen.C 
251   qt_helpers.C 
252 ''')
253
254 qt4 = qtenv.StaticLibrary(
255   target = '$LOCALLIBPATH/qt4',
256   LIBS = qtenv['QT_LIB'],
257   source = source_files + moc_files
258 )
259
260 # return the library
261 Return('qt4')