Package: qimageblitz / 1:0.0.6-5

12_remove_FindQt4.cmake.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
--- a/cmake/modules/FindQt4.cmake
+++ /dev/null
@@ -1,1465 +0,0 @@
-# - Find QT 4
-# This module can be used to find Qt4.
-# The most important issue is that the Qt4 qmake is available via the system path.
-# This qmake is then used to detect basically everything else.
-# This module defines a number of key variables and macros. 
-# First is QT_USE_FILE which is the path to a CMake file that can be included 
-# to compile Qt 4 applications and libraries.  By default, the QtCore and QtGui 
-# libraries are loaded. This behavior can be changed by setting one or more 
-# of the following variables to true before doing INCLUDE(${QT_USE_FILE}):
-#                    QT_DONT_USE_QTCORE
-#                    QT_DONT_USE_QTGUI
-#                    QT_USE_QT3SUPPORT
-#                    QT_USE_QTASSISTANT
-#                    QT_USE_QTDESIGNER
-#                    QT_USE_QTMOTIF
-#                    QT_USE_QTMAIN
-#                    QT_USE_QTNETWORK
-#                    QT_USE_QTNSPLUGIN
-#                    QT_USE_QTOPENGL
-#                    QT_USE_QTSQL
-#                    QT_USE_QTXML
-#                    QT_USE_QTSVG
-#                    QT_USE_QTTEST
-#                    QT_USE_QTUITOOLS
-#                    QT_USE_QTDBUS
-#                    QT_USE_QTSCRIPT
-#                    QT_USE_QTASSISTANTCLIENT
-#                    QT_USE_QTHELP
-#                    QT_USE_QTWEBKIT
-#                    QT_USE_QTXMLPATTERNS
-#                    QT_USE_PHONON
-#
-# The file pointed to by QT_USE_FILE will set up your compile environment
-# by adding include directories, preprocessor defines, and populate a
-# QT_LIBRARIES variable containing all the Qt libraries and their dependencies.
-# Add the QT_LIBRARIES variable to your TARGET_LINK_LIBRARIES.
-#
-# Typical usage could be something like:
-#   FIND_PACKAGE(Qt4)
-#   SET(QT_USE_QTXML 1)
-#   INCLUDE(${QT_USE_FILE})
-#   ADD_EXECUTABLE(myexe main.cpp)
-#   TARGET_LINK_LIBRARIES(myexe ${QT_LIBRARIES})
-#
-#
-# There are also some files that need processing by some Qt tools such as moc
-# and uic.  Listed below are macros that may be used to process those files.
-#  
-#  macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
-#        create moc code from a list of files containing Qt class with
-#        the Q_OBJECT declaration.  Options may be given to moc, such as those found
-#        when executing "moc -help"
-#
-#  macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
-#        create code from a list of Qt designer ui files.
-#        Options may be given to uic, such as those found
-#        when executing "uic -help"
-#
-#  macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...)
-#        create code from a list of Qt resource files.
-#        Options may be given to rcc, such as those found
-#        when executing "rcc -help"
-#
-#  macro QT4_GENERATE_MOC(inputfile outputfile )
-#        creates a rule to run moc on infile and create outfile.
-#        Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g.
-#        because you need a custom filename for the moc file or something similar.
-#
-#  macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... )
-#        This macro is still experimental.
-#        It can be used to have moc automatically handled.
-#        So if you have the files foo.h and foo.cpp, and in foo.h a 
-#        a class uses the Q_OBJECT macro, moc has to run on it. If you don't
-#        want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert
-#        #include "foo.moc"
-#        in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the
-#        scan all listed files at cmake-time for such included moc files and if it finds
-#        them cause a rule to be generated to run moc at build time on the 
-#        accompanying header file foo.h.
-#        If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro.
-#
-#  macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
-#        create a the interface header and implementation files with the 
-#        given basename from the given interface xml file and add it to 
-#        the list of sources.
-#        To disable generating a namespace header, set the source file property 
-#        NO_NAMESPACE to TRUE on the interface file.
-#
-#  macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
-#        create the interface header and implementation files 
-#        for all listed interface xml files
-#        the name will be automatically determined from the name of the xml file
-#        To disable generating namespace headers, set the source file property 
-#        NO_NAMESPACE to TRUE for these inputfiles.
-#
-#  macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
-#        create a dbus adaptor (header and implementation file) from the xml file
-#        describing the interface, and add it to the list of sources. The adaptor
-#        forwards the calls to a parent class, defined in parentheader and named
-#        parentclassname. The name of the generated files will be
-#        <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file.
-#        If <classname> is provided, then it will be used as the classname of the
-#        adaptor itself.
-#
-#  macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...)
-#        generate the xml interface file from the given header.
-#        If the optional argument interfacename is omitted, the name of the 
-#        interface file is constructed from the basename of the header with
-#        the suffix .xml appended.
-#        Options may be given to uic, such as those found when executing "qdbuscpp2xml --help"
-#
-#  QT_FOUND         If false, don't try to use Qt.
-#  QT4_FOUND        If false, don't try to use Qt 4.
-#
-#  QT_QTCORE_FOUND        True if QtCore was found.
-#  QT_QTGUI_FOUND         True if QtGui was found.
-#  QT_QT3SUPPORT_FOUND    True if Qt3Support was found.
-#  QT_QTASSISTANT_FOUND   True if QtAssistant was found.
-#  QT_QTDBUS_FOUND        True if QtDBus was found.
-#  QT_QTDESIGNER_FOUND    True if QtDesigner was found.
-#  QT_QTDESIGNERCOMPONENTS True if QtDesignerComponents was found.
-#  QT_QTMOTIF_FOUND       True if QtMotif was found.
-#  QT_QTNETWORK_FOUND     True if QtNetwork was found.
-#  QT_QTNSPLUGIN_FOUND    True if QtNsPlugin was found.
-#  QT_QTOPENGL_FOUND      True if QtOpenGL was found.
-#  QT_QTSQL_FOUND         True if QtSql was found.
-#  QT_QTXML_FOUND         True if QtXml was found.
-#  QT_QTSVG_FOUND         True if QtSvg was found.
-#  QT_QTSCRIPT_FOUND      True if QtScript was found.
-#  QT_QTTEST_FOUND        True if QtTest was found.
-#  QT_QTUITOOLS_FOUND     True if QtUiTools was found.
-#  QT_QTASSISTANTCLIENT_FOUND         True if QtAssistantClient was found.
-#  QT_QTHELP_FOUND      True if QtHelp was found.
-#  QT_QTWEBKIT_FOUND        True if QtWebKit was found.
-#  QT_QTXMLPATTERNS_FOUND   True if QtXmlPatterns was found.
-#  QT_PHONON_FOUND          True if phonon was found.
-#
-#
-#  QT_DEFINITIONS   Definitions to use when compiling code that uses Qt.
-#                   You do not need to use this if you include QT_USE_FILE.
-#                   The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG
-#                   to fit your current build type.  Those are not contained
-#                   in QT_DEFINITIONS.
-#                  
-#  QT_INCLUDES      List of paths to all include directories of 
-#                   Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are
-#                   always in this variable even if NOTFOUND,
-#                   all other INCLUDE_DIRS are
-#                   only added if they are found.
-#                   You do not need to use this if you include QT_USE_FILE.
-#   
-#
-#  Include directories for the Qt modules are listed here.
-#  You do not need to use these variables if you include QT_USE_FILE.
-#
-#  QT_INCLUDE_DIR              Path to "include" of Qt4
-#  QT_QT_INCLUDE_DIR           Path to "include/Qt" 
-#  QT_QT3SUPPORT_INCLUDE_DIR   Path to "include/Qt3Support" 
-#  QT_QTASSISTANT_INCLUDE_DIR  Path to "include/QtAssistant" 
-#  QT_QTCORE_INCLUDE_DIR       Path to "include/QtCore"         
-#  QT_QTDESIGNER_INCLUDE_DIR   Path to "include/QtDesigner" 
-#  QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR   Path to "include/QtDesigner"
-#  QT_QTDBUS_INCLUDE_DIR       Path to "include/QtDBus" 
-#  QT_QTGUI_INCLUDE_DIR        Path to "include/QtGui" 
-#  QT_QTMOTIF_INCLUDE_DIR      Path to "include/QtMotif" 
-#  QT_QTNETWORK_INCLUDE_DIR    Path to "include/QtNetwork" 
-#  QT_QTNSPLUGIN_INCLUDE_DIR   Path to "include/QtNsPlugin" 
-#  QT_QTOPENGL_INCLUDE_DIR     Path to "include/QtOpenGL" 
-#  QT_QTSQL_INCLUDE_DIR        Path to "include/QtSql" 
-#  QT_QTXML_INCLUDE_DIR        Path to "include/QtXml" 
-#  QT_QTSVG_INCLUDE_DIR        Path to "include/QtSvg"
-#  QT_QTSCRIPT_INCLUDE_DIR     Path to "include/QtScript"
-#  QT_QTTEST_INCLUDE_DIR       Path to "include/QtTest"
-#  QT_QTASSISTANTCLIENT_INCLUDE_DIR       Path to "include/QtAssistant"
-#  QT_QTHELP_INCLUDE_DIR       Path to "include/QtHelp"
-#  QT_QTWEBKIT_INCLUDE_DIR     Path to "include/QtWebKit"
-#  QT_QTXMLPATTERNS_INCLUDE_DIR  Path to "include/QtXmlPatterns"
-#  QT_PHONON_INCLUDE_DIR       Path to "include/phonon"
-#                            
-#  QT_LIBRARY_DIR              Path to "lib" of Qt4
-# 
-#  QT_PLUGINS_DIR              Path to "plugins" for Qt4
-#                            
-# For every library of Qt, a QT_QTFOO_LIBRARY variable is defined, with the full path to the library.
-#
-# So there are the following variables:
-# The Qt3Support library:     QT_QT3SUPPORT_LIBRARY
-#
-# The QtAssistant library:    QT_QTASSISTANT_LIBRARY
-#
-# The QtCore library:         QT_QTCORE_LIBRARY
-#
-# The QtDBus library:         QT_QTDBUS_LIBRARY
-#
-# The QtDesigner library:     QT_QTDESIGNER_LIBRARY
-#
-# The QtDesignerComponents library:     QT_QTDESIGNERCOMPONENTS_LIBRARY
-#
-# The QtGui library:          QT_QTGUI_LIBRARY
-#
-# The QtMotif library:        QT_QTMOTIF_LIBRARY
-#
-# The QtNetwork library:      QT_QTNETWORK_LIBRARY
-#
-# The QtNsPLugin library:     QT_QTNSPLUGIN_LIBRARY
-#
-# The QtOpenGL library:       QT_QTOPENGL_LIBRARY
-#
-# The QtSql library:          QT_QTSQL_LIBRARY
-#
-# The QtXml library:          QT_QTXML_LIBRARY
-#
-# The QtSvg library:          QT_QTSVG_LIBRARY
-#
-# The QtScript library:       QT_QTSCRIPT_LIBRARY
-#
-# The QtTest library:         QT_QTTEST_LIBRARY
-#
-# The qtmain library for Windows QT_QTMAIN_LIBRARY
-#
-# The QtUiTools library:      QT_QTUITOOLS_LIBRARY
-
-#
-# The QtAssistantClient library:  QT_QTASSISTANTCLIENT_LIBRARY
-#
-# The QtHelp library:             QT_QTHELP_LIBRARY
-#
-# The QtWebKit library:           QT_QTWEBKIT_LIBRARY
-#
-# The QtXmlPatterns library:      QT_QTXMLPATTERNS_LIBRARY
-#
-# The Phonon library:             QT_PHONON_LIBRARY
-
-
-
-#  
-# also defined, but NOT for general use are
-#  QT_MOC_EXECUTABLE          Where to find the moc tool.
-#  QT_UIC_EXECUTABLE          Where to find the uic tool.
-#  QT_UIC3_EXECUTABLE         Where to find the uic3 tool.
-#  QT_RCC_EXECUTABLE          Where to find the rcc tool
-#  QT_DBUSCPP2XML_EXECUTABLE  Where to find the qdbuscpp2xml tool.
-#  QT_DBUSXML2CPP_EXECUTABLE  Where to find the qdbusxml2cpp tool.
-#  QT_LUPDATE_EXECUTABLE      Where to find the lupdate tool.
-#  QT_LRELEASE_EXECUTABLE     Where to find the lrelease tool.
-#  
-#  QT_DOC_DIR                 Path to "doc" of Qt4
-#  QT_MKSPECS_DIR             Path to "mkspecs" of Qt4
-#
-#
-# These are around for backwards compatibility 
-# they will be set
-#  QT_WRAP_CPP  Set true if QT_MOC_EXECUTABLE is found
-#  QT_WRAP_UI   Set true if QT_UIC_EXECUTABLE is found
-#  
-# These variables do _NOT_ have any effect anymore (compared to FindQt.cmake)
-#  QT_MT_REQUIRED         Qt4 is now always multithreaded
-#  
-# These variables are set to "" Because Qt structure changed 
-# (They make no sense in Qt4)
-#  QT_QT_LIBRARY        Qt-Library is now split
-
-# Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
-# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
-
-if (QT4_QMAKE_FOUND)
-   # Check already done in this cmake run, nothing more to do
-
-else (QT4_QMAKE_FOUND)
-
-# check that QT_NO_DEBUG is defined for release configurations
-MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC)
-  IF(NOT ${VAR} MATCHES "${FLAG}")
-    SET(${VAR} "${${VAR}} ${FLAG}" 
-      CACHE STRING "Flags used by the compiler during ${DOC} builds." FORCE)
-  ENDIF(NOT ${VAR} MATCHES "${FLAG}")
-ENDMACRO(QT_CHECK_FLAG_EXISTS FLAG VAR)
-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO "Release with Debug Info")
-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELEASE "release")
-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release minsize")
-
-INCLUDE(CheckSymbolExists)
-INCLUDE(MacroAddFileDependencies)
-INCLUDE(MacroPushRequiredVars)
-
-SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
-
-SET( QT_DEFINITIONS "")
-
-IF (WIN32)
-  SET(QT_DEFINITIONS -DQT_DLL)
-ENDIF(WIN32)
-
-SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
-
-#  macro for asking qmake to process pro files
-MACRO(QT_QUERY_QMAKE outvar invar)
-  FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake/tmp.pro
-    "message(CMAKE_MESSAGE<$$${invar}>)")
-
-  # Invoke qmake with the tmp.pro program to get the desired
-  # information.  Use the same variable for both stdout and stderr
-  # to make sure we get the output on all platforms.
-  EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE}
-    WORKING_DIRECTORY  
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake
-    OUTPUT_VARIABLE _qmake_query_output
-    RESULT_VARIABLE _qmake_result
-    ERROR_VARIABLE _qmake_query_output )
-  
-  FILE(REMOVE_RECURSE 
-    "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake")
-
-  IF(_qmake_result)
-    MESSAGE(WARNING " querying qmake for ${invar}.  qmake reported:\n${_qmake_query_output}")
-  ELSE(_qmake_result)
-    STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}")
-  ENDIF(_qmake_result)
-
-ENDMACRO(QT_QUERY_QMAKE)
-
-GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
-# check for qmake
-FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 PATHS
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
-  $ENV{QTDIR}/bin
-)
-
-IF (QT_QMAKE_EXECUTABLE)
-
-  SET(QT4_QMAKE_FOUND FALSE)
-  
-  EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
-
-  # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
-  IF("${QTVERSION}" MATCHES "Unknown")
-    SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
-    FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
-      "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
-      "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
-      $ENV{QTDIR}/bin
-      )
-    IF(QT_QMAKE_EXECUTABLE)
-      EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} 
-        ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
-    ENDIF(QT_QMAKE_EXECUTABLE)
-  ENDIF("${QTVERSION}" MATCHES "Unknown")
-
-  # check that we found the Qt4 qmake, Qt3 qmake output won't match here
-  STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}")
-  IF (qt_version_tmp)
-
-    # we need at least version 4.0.0
-    IF (NOT QT_MIN_VERSION)
-      SET(QT_MIN_VERSION "4.0.0")
-    ENDIF (NOT QT_MIN_VERSION)
-
-    #now parse the parts of the user given version string into variables
-    STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qt_major_vers "${QT_MIN_VERSION}")
-    IF (NOT req_qt_major_vers)
-      MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"4.0.1\"")
-    ENDIF (NOT req_qt_major_vers)
-
-    # now parse the parts of the user given version string into variables
-    STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}")
-
-    IF (NOT req_qt_major_vers EQUAL 4)
-      MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", major version 4 is required, e.g. \"4.0.1\"")
-    ENDIF (NOT req_qt_major_vers EQUAL 4)
-
-    # and now the version string given by qmake
-    STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" found_qt_major_vers "${QTVERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" found_qt_minor_vers "${QTVERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" found_qt_patch_vers "${QTVERSION}")
-
-    # compute an overall version number which can be compared at once
-    MATH(EXPR req_vers "${req_qt_major_vers}*10000 + ${req_qt_minor_vers}*100 + ${req_qt_patch_vers}")
-    MATH(EXPR found_vers "${found_qt_major_vers}*10000 + ${found_qt_minor_vers}*100 + ${found_qt_patch_vers}")
-
-    IF (found_vers LESS req_vers)
-      SET(QT4_QMAKE_FOUND FALSE)
-      SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE)
-    ELSE (found_vers LESS req_vers)
-      SET(QT4_QMAKE_FOUND TRUE)
-    ENDIF (found_vers LESS req_vers)
-  ENDIF (qt_version_tmp)
-
-ENDIF (QT_QMAKE_EXECUTABLE)
-
-IF (QT4_QMAKE_FOUND)
-
-  if (WIN32)
-    # get qt install dir 
-    get_filename_component(_DIR ${QT_QMAKE_EXECUTABLE} PATH )
-    get_filename_component(QT_INSTALL_DIR ${_DIR} PATH )
-  endif (WIN32)
-
-  # ask qmake for the library dir
-  # Set QT_LIBRARY_DIR
-  IF (NOT QT_LIBRARY_DIR)
-    EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
-      ARGS "-query QT_INSTALL_LIBS"
-      OUTPUT_VARIABLE QT_LIBRARY_DIR_TMP )
-    # make sure we have / and not \ as qmake gives on windows
-    FILE(TO_CMAKE_PATH "${QT_LIBRARY_DIR_TMP}" QT_LIBRARY_DIR_TMP)
-    IF(EXISTS "${QT_LIBRARY_DIR_TMP}")
-      SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE PATH "Qt library dir")
-    ELSE(EXISTS "${QT_LIBRARY_DIR_TMP}")
-      MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT_LIBRARY_DIR_TMP}")
-      MESSAGE("Warning: ${QT_LIBRARY_DIR_TMP} does NOT exist, Qt must NOT be installed correctly.")
-    ENDIF(EXISTS "${QT_LIBRARY_DIR_TMP}")
-  ENDIF(NOT QT_LIBRARY_DIR)
-  
-  IF (APPLE)
-    IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-      SET(QT_USE_FRAMEWORKS ON
-        CACHE BOOL "Set to ON if Qt build uses frameworks.")
-    ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-      SET(QT_USE_FRAMEWORKS OFF
-        CACHE BOOL "Set to ON if Qt build uses frameworks.")
-    ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-    
-    MARK_AS_ADVANCED(QT_USE_FRAMEWORKS)
-  ENDIF (APPLE)
-  
-  # ask qmake for the binary dir
-  IF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR)
-     EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
-       ARGS "-query QT_INSTALL_BINS"
-       OUTPUT_VARIABLE qt_bins )
-     # make sure we have / and not \ as qmake gives on windows
-     FILE(TO_CMAKE_PATH "${qt_bins}" qt_bins)
-     SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "")
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR)
-
-  # ask qmake for the include dir
-  IF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR)
-      EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
-        ARGS "-query QT_INSTALL_HEADERS" 
-        OUTPUT_VARIABLE qt_headers ) 
-      # make sure we have / and not \ as qmake gives on windows
-      FILE(TO_CMAKE_PATH "${qt_headers}" qt_headers)
-      SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "")
-  ENDIF(QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR)
-
-
-  # ask qmake for the documentation directory
-  IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR)
-    EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
-      ARGS "-query QT_INSTALL_DOCS"
-      OUTPUT_VARIABLE qt_doc_dir )
-    # make sure we have / and not \ as qmake gives on windows
-    FILE(TO_CMAKE_PATH "${qt_doc_dir}" qt_doc_dir)
-    SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs")
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR)
-
-  # ask qmake for the mkspecs directory
-  IF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR)
-    EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
-      ARGS "-query QMAKE_MKSPECS"
-      OUTPUT_VARIABLE qt_mkspecs_dirs )
-    # do not replace : on windows as it might be a drive letter
-    # and windows should already use ; as a separator
-    IF(UNIX)
-      STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}")
-    ENDIF(UNIX)
-    FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs}
-      DOC "The location of the Qt mkspecs containing qconfig.pri"
-      NO_DEFAULT_PATH )
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR)
-
-  # ask qmake for the plugins directory
-  IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR)
-    EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
-      ARGS "-query QT_INSTALL_PLUGINS"
-      OUTPUT_VARIABLE qt_plugins_dir )
-    # make sure we have / and not \ as qmake gives on windows
-    FILE(TO_CMAKE_PATH "${qt_plugins_dir}" qt_plugins_dir)
-    SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins")
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR)
-  ########################################
-  #
-  #       Setting the INCLUDE-Variables
-  #
-  ########################################
-
-  FIND_PATH(QT_QTCORE_INCLUDE_DIR QtGlobal
-    ${QT_HEADERS_DIR}/QtCore
-    ${QT_LIBRARY_DIR}/QtCore.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_INCLUDE_DIR by removine "/QtCore" in the string ${QT_QTCORE_INCLUDE_DIR}
-  IF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)
-    IF (QT_USE_FRAMEWORKS)
-      SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR})
-    ELSE (QT_USE_FRAMEWORKS)
-      STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT_QTCORE_INCLUDE_DIR})
-      SET( QT_INCLUDE_DIR ${qt4_include_dir} CACHE PATH "")
-    ENDIF (QT_USE_FRAMEWORKS)
-  ENDIF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)
-
-  IF( NOT QT_INCLUDE_DIR)
-    IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
-      MESSAGE( FATAL_ERROR "Could NOT find QtGlobal header")
-    ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
-  ENDIF( NOT QT_INCLUDE_DIR)
-
-  #############################################
-  #
-  # Find out what window system we're using
-  #
-  #############################################
-  # Save required includes and required_flags variables
-  macro_push_required_vars()
-  # Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
-  SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}")
-  # On Mac OS X when Qt has framework support, also add the framework path
-  IF( QT_USE_FRAMEWORKS )
-    SET(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ")
-  ENDIF( QT_USE_FRAMEWORKS )
-  # Check for Window system symbols (note: only one should end up being set)
-  CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
-  CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
-  CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
-  CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
-
-  IF (QT_QTCOPY_REQUIRED)
-     CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
-     IF (NOT QT_IS_QTCOPY)
-        MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found")
-     ENDIF (NOT QT_IS_QTCOPY)
-  ENDIF (QT_QTCOPY_REQUIRED)
-
-  # Restore CMAKE_REQUIRED_INCLUDES+CMAKE_REQUIRED_FLAGS variables
-  macro_pop_required_vars()
-  #
-  #############################################
-
-  IF (QT_USE_FRAMEWORKS)
-    SET(QT_DEFINITIONS ${QT_DEFINITIONS} -F${QT_LIBRARY_DIR} -L${QT_LIBRARY_DIR} )
-  ENDIF (QT_USE_FRAMEWORKS)
-
-  # Set QT_QT3SUPPORT_INCLUDE_DIR
-  FIND_PATH(QT_QT3SUPPORT_INCLUDE_DIR Qt3Support
-    PATHS
-    ${QT_INCLUDE_DIR}/Qt3Support
-    ${QT_LIBRARY_DIR}/Qt3Support.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QT_INCLUDE_DIR
-  FIND_PATH(QT_QT_INCLUDE_DIR qglobal.h
-    PATHS
-    ${QT_INCLUDE_DIR}/Qt
-    ${QT_LIBRARY_DIR}/QtCore.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTGUI_INCLUDE_DIR
-  FIND_PATH(QT_QTGUI_INCLUDE_DIR QtGui
-    PATHS
-    ${QT_INCLUDE_DIR}/QtGui
-    ${QT_LIBRARY_DIR}/QtGui.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTSVG_INCLUDE_DIR
-  FIND_PATH(QT_QTSVG_INCLUDE_DIR QtSvg
-    PATHS
-    ${QT_INCLUDE_DIR}/QtSvg
-    ${QT_LIBRARY_DIR}/QtSvg.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTSCRIPT_INCLUDE_DIR
-  FIND_PATH(QT_QTSCRIPT_INCLUDE_DIR QtScript
-    PATHS
-    ${QT_INCLUDE_DIR}/QtScript
-    ${QT_LIBRARY_DIR}/QtScript.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTTEST_INCLUDE_DIR
-  FIND_PATH(QT_QTTEST_INCLUDE_DIR QtTest
-    PATHS
-    ${QT_INCLUDE_DIR}/QtTest
-    ${QT_LIBRARY_DIR}/QtTest.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTUITOOLS_INCLUDE_DIR
-  FIND_PATH(QT_QTUITOOLS_INCLUDE_DIR QtUiTools
-    PATHS
-    ${QT_INCLUDE_DIR}/QtUiTools
-    ${QT_LIBRARY_DIR}/QtUiTools.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTMOTIF_INCLUDE_DIR
-  IF(Q_WS_X11)
-    FIND_PATH(QT_QTMOTIF_INCLUDE_DIR QtMotif 
-      PATHS 
-      ${QT_INCLUDE_DIR}/QtMotif 
-      NO_DEFAULT_PATH )
-  ENDIF(Q_WS_X11)
-
-  # Set QT_QTNETWORK_INCLUDE_DIR
-  FIND_PATH(QT_QTNETWORK_INCLUDE_DIR QtNetwork
-    PATHS
-    ${QT_INCLUDE_DIR}/QtNetwork
-    ${QT_LIBRARY_DIR}/QtNetwork.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTNSPLUGIN_INCLUDE_DIR
-  FIND_PATH(QT_QTNSPLUGIN_INCLUDE_DIR QtNsPlugin
-    PATHS
-    ${QT_INCLUDE_DIR}/QtNsPlugin
-    ${QT_LIBRARY_DIR}/QtNsPlugin.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTOPENGL_INCLUDE_DIR
-  FIND_PATH(QT_QTOPENGL_INCLUDE_DIR QtOpenGL
-    PATHS
-    ${QT_INCLUDE_DIR}/QtOpenGL
-    ${QT_LIBRARY_DIR}/QtOpenGL.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTSQL_INCLUDE_DIR
-  FIND_PATH(QT_QTSQL_INCLUDE_DIR QtSql
-    PATHS
-    ${QT_INCLUDE_DIR}/QtSql
-    ${QT_LIBRARY_DIR}/QtSql.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTXML_INCLUDE_DIR
-  FIND_PATH(QT_QTXML_INCLUDE_DIR QtXml
-    PATHS
-    ${QT_INCLUDE_DIR}/QtXml
-    ${QT_LIBRARY_DIR}/QtXml.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTASSISTANT_INCLUDE_DIR
-  FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant
-    PATHS
-    ${QT_INCLUDE_DIR}/QtAssistant
-    ${QT_HEADERS_DIR}/QtAssistant
-    ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTDESIGNER_INCLUDE_DIR
-  FIND_PATH(QT_QTDESIGNER_INCLUDE_DIR QDesignerComponents
-    PATHS
-    ${QT_INCLUDE_DIR}/QtDesigner
-    ${QT_HEADERS_DIR}/QtDesigner 
-    ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
-  FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
-    PATHS
-    ${QT_INCLUDE_DIR}/QtDesigner
-    ${QT_HEADERS_DIR}/QtDesigner
-    NO_DEFAULT_PATH
-    )
-
-  # Set QT_QTDBUS_INCLUDE_DIR
-  FIND_PATH(QT_QTDBUS_INCLUDE_DIR QtDBus
-    PATHS
-    ${QT_INCLUDE_DIR}/QtDBus
-    ${QT_HEADERS_DIR}/QtDBus
-    NO_DEFAULT_PATH
-    )
-  
-  # Set QT_QTASSISTANTCLIENT_INCLUDE_DIR
-  FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient
-    PATHS
-    ${QT_INCLUDE_DIR}/QtAssistant
-    ${QT_HEADERS_DIR}/QtAssistant
-    NO_DEFAULT_PATH
-    )
-  
-  # Set QT_QTHELP_INCLUDE_DIR
-  FIND_PATH(QT_QTHELP_INCLUDE_DIR QtHelp
-    PATHS
-    ${QT_INCLUDE_DIR}/QtHelp
-    ${QT_HEADERS_DIR}/QtHelp
-    NO_DEFAULT_PATH
-    )
-  
-  # Set QT_QTWEBKIT_INCLUDE_DIR
-  FIND_PATH(QT_QTWEBKIT_INCLUDE_DIR QtWebKit
-    PATHS
-    ${QT_INCLUDE_DIR}/QtWebKit
-    ${QT_HEADERS_DIR}/QtWebKit
-    NO_DEFAULT_PATH
-    )
-  
-  # Set QT_QTXMLPATTERNS_INCLUDE_DIR
-  FIND_PATH(QT_QTXMLPATTERNS_INCLUDE_DIR QtXmlPatterns
-    PATHS
-    ${QT_INCLUDE_DIR}/QtXmlPatterns
-    ${QT_HEADERS_DIR}/QtXmlPatterns
-    NO_DEFAULT_PATH
-    )
-  
-  # Set QT_PHONON_INCLUDE_DIR
-  FIND_PATH(QT_PHONON_INCLUDE_DIR phonon
-    PATHS
-    ${QT_INCLUDE_DIR}/phonon
-    NO_DEFAULT_PATH
-    )
-
-  # Make variables changeble to the advanced user
-  MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_QT_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR QT_PLUGINS_DIR)
-
-  # Set QT_INCLUDES
-  SET( QT_INCLUDES ${QT_QT_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} )
-
-  ########################################
-  #
-  #       Setting the LIBRARY-Variables
-  #
-  ########################################
-
-  IF (QT_USE_FRAMEWORKS)
-    # If FIND_LIBRARY found libraries in Apple frameworks, we would NOT have
-    # to jump through these hoops.
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-      SET(QT_QTCORE_FOUND TRUE)
-      SET(QT_QTCORE_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtCore" CACHE STRING "The QtCore library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-      SET(QT_QTCORE_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtGui.framework)
-      SET(QT_QTGUI_FOUND TRUE)
-      SET(QT_QTGUI_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtGui" CACHE STRING "The QtGui library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtGui.framework)
-      SET(QT_QTGUI_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtGui.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/Qt3Support.framework)
-      SET(QT_QT3SUPPORT_FOUND TRUE)
-      SET(QT_QT3SUPPORT_LIBRARY "-F${QT_LIBRARY_DIR} -framework Qt3Support" CACHE STRING "The Qt3Support library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/Qt3Support.framework)
-      SET(QT_QT3SUPPORT_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/Qt3Support.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtNetwork.framework)
-      SET(QT_QTNETWORK_FOUND TRUE)
-      SET(QT_QTNETWORK_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtNetwork" CACHE STRING "The QtNetwork library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtNetwork.framework)
-      SET(QT_QTNETWORK_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtNetwork.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtOpenGL.framework)
-      SET(QT_QTOPENGL_FOUND TRUE)
-      SET(QT_QTOPENGL_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtOpenGL" CACHE STRING "The QtOpenGL library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtOpenGL.framework)
-      SET(QT_QTOPENGL_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtOpenGL.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtSql.framework)
-      SET(QT_QTSQL_FOUND TRUE)
-      SET(QT_QTSQL_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtSql" CACHE STRING "The QtSql library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtSql.framework)
-      SET(QT_QTSQL_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtSql.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtXml.framework)
-      SET(QT_QTXML_FOUND TRUE)
-      SET(QT_QTXML_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtXml" CACHE STRING "The QtXml library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtXml.framework)
-      SET(QT_QTXML_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtXml.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtSvg.framework)
-      SET(QT_QTSVG_FOUND TRUE)
-      SET(QT_QTSVG_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtSvg" CACHE STRING "The QtSvg library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtSvg.framework)
-      SET(QT_QTSVG_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtSvg.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtDBus.framework)
-      SET(QT_QTDBUS_FOUND TRUE)
-      SET(QT_QTDBUS_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtDBus" CACHE STRING "The QtDBus library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtDBus.framework)
-      SET(QT_QTDBUS_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtDBus.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtTest.framework)
-      SET(QT_QTTEST_FOUND TRUE)
-      SET(QT_QTTEST_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtTest" CACHE STRING "The QtTest library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtTest.framework)
-      SET(QT_QTTEST_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtTest.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtAssistantClient.framework)
-      SET(QT_QTASSISTANTCLIENT_FOUND TRUE)
-      SET(QT_QTASSISTANTCLIENT_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtAssistantClient" CACHE STRING "The QtAssistantClient library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtAssistantClient.framework)
-      SET(QT_QTASSISTANTCLIENT_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtAssistantClient.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtWebKit.framework)
-      SET(QT_QTWEBKIT_FOUND TRUE)
-      SET(QT_QTWEBKIT_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtWebKit" CACHE STRING "The QtWebKit library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtWebKit.framework)
-      SET(QT_QTWEBKIT_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtWebKit.framework)
-
-    IF(EXISTS ${QT_LIBRARY_DIR}/QtXmlPatterns.framework)
-      SET(QT_QTXMLPATTERNS_FOUND TRUE)
-      SET(QT_QTXMLPATTERNS_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtXmlPatterns" CACHE STRING "The QtXmlPatterns library.")
-    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtXmlPatterns.framework)
-      SET(QT_QTXMLPATTERNS_FOUND FALSE)
-    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtXmlPatterns.framework)
-
-
-    # WTF?  why don't we have frameworks?  :P
-    # Set QT_QTUITOOLS_LIBRARY
-    FIND_LIBRARY(QT_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools4 PATHS ${QT_LIBRARY_DIR} )
-    # Set QT_QTSCRIPT_LIBRARY
-    FIND_LIBRARY(QT_QTSCRIPT_LIBRARY NAMES QtScript QtScript4    PATHS ${QT_LIBRARY_DIR} )
-
-  ELSE (QT_USE_FRAMEWORKS)
-    
-    # Set QT_QTCORE_LIBRARY by searching for a lib with "QtCore."  as part of the filename
-    FIND_LIBRARY(QT_QTCORE_LIBRARY NAMES QtCore QtCore4 QtCored4 QtCore_debug         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH )
-
-    # Set QT_QT3SUPPORT_LIBRARY
-    FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY NAMES Qt3Support Qt3Support_debug Qt3Support4 Qt3Supportd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    # Set QT_QTGUI_LIBRARY
-    FIND_LIBRARY(QT_QTGUI_LIBRARY NAMES QtGui QtGui_debug QtGui_debug QtGui4 QtGuid4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    # Set QT_QTMOTIF_LIBRARY
-    IF(Q_WS_X11)
-      FIND_LIBRARY(QT_QTMOTIF_LIBRARY NAMES QtMotif  QtMotif_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-    ENDIF(Q_WS_X11)
-
-    # Set QT_QTNETWORK_LIBRARY
-    FIND_LIBRARY(QT_QTNETWORK_LIBRARY NAMES QtNetwork QtNetwork_debug QtNetwork4 QtNetworkd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    # Set QT_QTNSPLUGIN_LIBRARY
-    FIND_LIBRARY(QT_QTNSPLUGIN_LIBRARY NAMES QtNsPlugin QtNsPlugin_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    # Set QT_QTOPENGL_LIBRARY
-    FIND_LIBRARY(QT_QTOPENGL_LIBRARY NAMES QtOpenGL QtOpenGL_debug QtOpenGL4 QtOpenGLd4    PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    # Set QT_QTSQL_LIBRARY
-    FIND_LIBRARY(QT_QTSQL_LIBRARY NAMES QtSql QtSql_debug QtSql4 QtSqld4       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    # Set QT_QTXML_LIBRARY
-    FIND_LIBRARY(QT_QTXML_LIBRARY NAMES QtXml QtXml_debug QtXml4 QtXmld4       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    # Set QT_QTSVG_LIBRARY
-    FIND_LIBRARY(QT_QTSVG_LIBRARY NAMES QtSvg QtSvg_debug QtSvg4 QtSvgd4       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    # Set QT_QTSCRIPT_LIBRARY
-    FIND_LIBRARY(QT_QTSCRIPT_LIBRARY NAMES QtScript QtScript_debug QtScript4 QtScriptd4   PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    # Set QT_QTUITOOLS_LIBRARY
-    FIND_LIBRARY(QT_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools_debug QtUiTools4 QtUiToolsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    # Set QT_QTTEST_LIBRARY
-    FIND_LIBRARY(QT_QTTEST_LIBRARY NAMES QtTest QtTest_debug QtTest4 QtTestd4          PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    FIND_LIBRARY(QT_QTDBUS_LIBRARY NAMES QtDBus QtDBus_debug QtDBus4 QtDBusd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY NAMES QtAssistantClient QtAssistantClient_debug QtAssistantClient4 QtAssistantClientd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    FIND_LIBRARY(QT_QTHELP_LIBRARY NAMES QtHelp QtHelp_debug QtHelp4 QtHelpd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    FIND_LIBRARY(QT_QTWEBKIT_LIBRARY NAMES QtWebKit QtWebKit_debug QtWebKit4 QtWebKitd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY NAMES QtXmlPatterns QtXmlPatterns_debug QtXmlPatterns4 QtXmlPatternsd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    FIND_LIBRARY(QT_PHONON_LIBRARY NAMES phonon phonon4 phonon_debug phonond4    PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-
-    IF(MSVC)
-      FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE    NAMES QtCore4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG      NAMES QtCored4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY_RELEASE NAMES Qt3Support4        PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY_DEBUG  NAMES Qt3Supportd4        PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTGUI_LIBRARY_RELEASE     NAMES QtGui4             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTGUI_LIBRARY_DEBUG       NAMES QtGuid4             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTNETWORK_LIBRARY_RELEASE NAMES QtNetwork4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTNETWORK_LIBRARY_DEBUG   NAMES QtNetworkd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTOPENGL_LIBRARY_RELEASE  NAMES QtOpenGL4          PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTOPENGL_LIBRARY_DEBUG    NAMES QtOpenGLd4          PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTSQL_LIBRARY_RELEASE     NAMES QtSql4             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTSQL_LIBRARY_DEBUG       NAMES QtSqld4             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTXML_LIBRARY_RELEASE     NAMES QtXml4             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTXML_LIBRARY_DEBUG       NAMES QtXmld4             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTSVG_LIBRARY_RELEASE     NAMES QtSvg4             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTSVG_LIBRARY_DEBUG       NAMES QtSvgd4             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_RELEASE  NAMES QtScript4          PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_DEBUG    NAMES QtScriptd4          PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools QtUiTools4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_DEBUG   NAMES QtUiToolsd QtUiToolsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTTEST_LIBRARY_RELEASE    NAMES QtTest4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTTEST_LIBRARY_DEBUG      NAMES QtTestd4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTDBUS_LIBRARY_RELEASE    NAMES QtDBus4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTDBUS_LIBRARY_DEBUG      NAMES QtDBusd4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClientd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTDESIGNER_LIBRARY_RELEASE NAMES QtDesigner4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTDESIGNER_LIBRARY_DEBUG  NAMES QtDesignerd4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponentsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE    NAMES qtmain             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-      FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG      NAMES qtmaind             PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-    ENDIF(MSVC)
-  ENDIF (QT_USE_FRAMEWORKS)
-
-  IF( NOT QT_QTCORE_LIBRARY )
-    IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
-      MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
-    ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
-  ENDIF( NOT QT_QTCORE_LIBRARY )
-
-  # Set QT_QTASSISTANT_LIBRARY
-  FIND_LIBRARY(QT_QTASSISTANT_LIBRARY NAMES QtAssistantClient QtAssistantClient4 QtAssistant QtAssistant4 QtAssistantd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-  # Set QT_QTDESIGNER_LIBRARY
-  FIND_LIBRARY(QT_QTDESIGNER_LIBRARY NAMES QtDesigner QtDesigner_debug QtDesigner4 QtDesignerd4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
-
-  # Set QT_QTDESIGNERCOMPONENTS_LIBRARY
-  FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY NAMES QtDesignerComponents QtDesignerComponents_debug QtDesignerComponents4 QtDesignerComponentsd4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
-
-  # Set QT_QTMAIN_LIBRARY
-  IF(WIN32)
-    FIND_LIBRARY(QT_QTMAIN_LIBRARY NAMES qtmain qtmaind PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-  ENDIF(WIN32)
-
-  ############################################
-  #
-  # Check the existence of the libraries.
-  #
-  ############################################
-
-  MACRO (_QT4_ADJUST_LIB_VARS basename)
-    IF (QT_${basename}_LIBRARY OR QT_${basename}_LIBRARY_DEBUG)
-
-      IF(MSVC)
-        # Both set
-        IF (QT_${basename}_LIBRARY_RELEASE AND QT_${basename}_LIBRARY_DEBUG)
-          SET(QT_${basename}_LIBRARY optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
-        ENDIF (QT_${basename}_LIBRARY_RELEASE AND QT_${basename}_LIBRARY_DEBUG)
-
-        # Only debug was found
-        IF (NOT QT_${basename}_LIBRARY_RELEASE AND QT_${basename}_LIBRARY_DEBUG)
-          SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_DEBUG})
-        ENDIF (NOT QT_${basename}_LIBRARY_RELEASE AND QT_${basename}_LIBRARY_DEBUG)
-
-        # Only release was found
-        IF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
-          SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE})
-        ENDIF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
-
-        # Hmm, is this used anywhere ? Yes, in UseQt4.cmake. We are currently incompatible :-(
-        SET(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY} debug ${QT_${basename}_LIBRARY_DEBUG})
-
-      ENDIF(MSVC)
-
-      SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE FILEPATH "The Qt ${basename} library")
-
-      IF (QT_${basename}_LIBRARY)
-        SET(QT_${basename}_FOUND 1)
-      ENDIF (QT_${basename}_LIBRARY)
-      
-    ENDIF (QT_${basename}_LIBRARY OR QT_${basename}_LIBRARY_DEBUG)
-    
-    IF (QT_${basename}_INCLUDE_DIR)
-      #add the include directory to QT_INCLUDES
-      SET(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES})
-    ENDIF (QT_${basename}_INCLUDE_DIR)
-
-    # Make variables changeble to the advanced user
-    MARK_AS_ADVANCED(QT_${basename}_LIBRARY QT_${basename}_INCLUDE_DIR)
-  ENDMACRO (_QT4_ADJUST_LIB_VARS)
-
-
-  # Set QT_xyz_LIBRARY variable and add 
-  # library include path to QT_INCLUDES
-  _QT4_ADJUST_LIB_VARS(QTCORE)
-  _QT4_ADJUST_LIB_VARS(QTGUI)
-  _QT4_ADJUST_LIB_VARS(QT3SUPPORT)
-  _QT4_ADJUST_LIB_VARS(QTASSISTANT)
-  _QT4_ADJUST_LIB_VARS(QTDESIGNER)
-  _QT4_ADJUST_LIB_VARS(QTDESIGNERCOMPONENTS)
-  _QT4_ADJUST_LIB_VARS(QTNETWORK)
-  _QT4_ADJUST_LIB_VARS(QTNSPLUGIN)
-  _QT4_ADJUST_LIB_VARS(QTOPENGL)
-  _QT4_ADJUST_LIB_VARS(QTSQL)
-  _QT4_ADJUST_LIB_VARS(QTXML)
-  _QT4_ADJUST_LIB_VARS(QTSVG)
-  _QT4_ADJUST_LIB_VARS(QTSCRIPT)
-  _QT4_ADJUST_LIB_VARS(QTUITOOLS)
-  _QT4_ADJUST_LIB_VARS(QTTEST)
-  _QT4_ADJUST_LIB_VARS(QTDBUS)
-  _QT4_ADJUST_LIB_VARS(QTASSISTANTCLIENT)
-  _QT4_ADJUST_LIB_VARS(QTHELP)
-  _QT4_ADJUST_LIB_VARS(QTWEBKIT)
-  _QT4_ADJUST_LIB_VARS(QTXMLPATTERNS)
-  _QT4_ADJUST_LIB_VARS(PHONON)
-
-  # platform dependent libraries
-  IF(Q_WS_X11)
-    _QT4_ADJUST_LIB_VARS(QTMOTIF)
-  ENDIF(Q_WS_X11)
-  IF(WIN32)
-    _QT4_ADJUST_LIB_VARS(QTMAIN)
-  ENDIF(WIN32)
-  
-
-  #######################################
-  #
-  #       Check the executables of Qt 
-  #          ( moc, uic, rcc )
-  #
-  #######################################
-
-
-  # find moc and uic using qmake
-  QT_QUERY_QMAKE(QT_MOC_EXECUTABLE_INTERNAL "QMAKE_MOC")
-  QT_QUERY_QMAKE(QT_UIC_EXECUTABLE_INTERNAL "QMAKE_UIC")
-
-  # make sure we have / and not \ as qmake gives on windows
-  FILE(TO_CMAKE_PATH 
-    "${QT_MOC_EXECUTABLE_INTERNAL}" QT_MOC_EXECUTABLE_INTERNAL)
-  # make sure we have / and not \ as qmake gives on windows
-  FILE(TO_CMAKE_PATH 
-    "${QT_UIC_EXECUTABLE_INTERNAL}" QT_UIC_EXECUTABLE_INTERNAL)
-
-  SET(QT_MOC_EXECUTABLE 
-    ${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable")
-  SET(QT_UIC_EXECUTABLE 
-    ${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable")
-
-  FIND_PROGRAM(QT_UIC3_EXECUTABLE
-    NAMES uic3
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_RCC_EXECUTABLE 
-    NAMES rcc
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE 
-    NAMES qdbuscpp2xml
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE 
-    NAMES qdbusxml2cpp
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_LUPDATE_EXECUTABLE
-    NAMES lupdate
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
-    NAMES lrelease
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  IF (QT_MOC_EXECUTABLE)
-     SET(QT_WRAP_CPP "YES")
-  ENDIF (QT_MOC_EXECUTABLE)
-
-  IF (QT_UIC_EXECUTABLE)
-     SET(QT_WRAP_UI "YES")
-  ENDIF (QT_UIC_EXECUTABLE)
-
-
-
-  MARK_AS_ADVANCED( QT_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT_MOC_EXECUTABLE
-    QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE
-    QT_LUPDATE_EXECUTABLE QT_LRELEASE_EXECUTABLE)
-
-  ######################################
-  #
-  #       Macros for building Qt files
-  #
-  ######################################
-
-  MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
-    SET(${_qt4_files})
-    SET(${_qt4_options})
-    SET(_QT4_DOING_OPTIONS FALSE)
-    FOREACH(_currentArg ${ARGN})
-      IF ("${_currentArg}" STREQUAL "OPTIONS")
-        SET(_QT4_DOING_OPTIONS TRUE)
-      ELSE ("${_currentArg}" STREQUAL "OPTIONS")
-        IF(_QT4_DOING_OPTIONS) 
-          LIST(APPEND ${_qt4_options} "${_currentArg}")
-        ELSE(_QT4_DOING_OPTIONS)
-          LIST(APPEND ${_qt4_files} "${_currentArg}")
-        ENDIF(_QT4_DOING_OPTIONS)
-      ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
-    ENDFOREACH(_currentArg) 
-  ENDMACRO (QT4_EXTRACT_OPTIONS)
-
-  MACRO (QT4_GET_MOC_INC_DIRS _moc_INC_DIRS)
-     SET(${_moc_INC_DIRS})
-     GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
-
-     FOREACH(_current ${_inc_DIRS})
-        SET(${_moc_INC_DIRS} ${${_moc_INC_DIRS}} "-I" ${_current})
-     ENDFOREACH(_current ${_inc_DIRS})
-
-  ENDMACRO(QT4_GET_MOC_INC_DIRS)
-
-
-  MACRO (QT4_GENERATE_MOC infile outfile )
-  # get include dirs
-     QT4_GET_MOC_INC_DIRS(moc_includes)
-
-     GET_FILENAME_COMPONENT(abs_infile ${infile} ABSOLUTE)
-
-     IF (MSVC_IDE)
-        SET (_moc_parameter_file ${outfile}_parameters)
-        SET (_moc_param "${moc_includes} \n-o${outfile} \n${abs_infile}")
-        STRING(REGEX REPLACE ";-I;" "\\n-I" _moc_param "${_moc_param}")
-        FILE (WRITE ${_moc_parameter_file} "${_moc_param}")
-        ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-          COMMAND ${QT_MOC_EXECUTABLE}
-          ARGS @"${_moc_parameter_file}"
-          DEPENDS ${abs_infile})
-     ELSE (MSVC_IDE)     
-        ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-           COMMAND ${QT_MOC_EXECUTABLE}
-           ARGS ${moc_includes} -o ${outfile} ${abs_infile}
-           DEPENDS ${abs_infile})     
-     ENDIF (MSVC_IDE)
-
-     SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE)  # dont run automoc on this file
-
-     MACRO_ADD_FILE_DEPENDENCIES(${abs_infile} ${outfile})
-  ENDMACRO (QT4_GENERATE_MOC)
-
-
-  # QT4_WRAP_CPP(outfiles inputfile ... )
-
-  MACRO (QT4_WRAP_CPP outfiles )
-    # get include dirs
-    QT4_GET_MOC_INC_DIRS(moc_includes)
-    QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
-
-    FOREACH (it ${moc_files})
-      GET_FILENAME_COMPONENT(it ${it} ABSOLUTE)
-      GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
-
-      SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/moc_${outfile}.cxx)
-      ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-        COMMAND ${QT_MOC_EXECUTABLE}
-        ARGS ${moc_includes} ${moc_options} -o ${outfile} ${it}
-        DEPENDS ${it})
-      SET(${outfiles} ${${outfiles}} ${outfile})
-    ENDFOREACH(it)
-
-  ENDMACRO (QT4_WRAP_CPP)
-
-
-  # QT4_WRAP_UI(outfiles inputfile ... )
-
-  MACRO (QT4_WRAP_UI outfiles )
-    QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
-
-    FOREACH (it ${ui_files})
-      GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
-      GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
-      SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
-      ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-        COMMAND ${QT_UIC_EXECUTABLE}
-        ARGS ${ui_options} -o ${outfile} ${infile}
-        MAIN_DEPENDENCY ${infile})
-      SET(${outfiles} ${${outfiles}} ${outfile})
-    ENDFOREACH (it)
-
-  ENDMACRO (QT4_WRAP_UI)
-
-
-  # QT4_ADD_RESOURCES(outfiles inputfile ... )
-
-  MACRO (QT4_ADD_RESOURCES outfiles )
-    QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
-
-    FOREACH (it ${rcc_files})
-      GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
-      GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
-      GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
-      SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
-      #  parse file for dependencies 
-      #  all files are absolute paths or relative to the location of the qrc file
-      FILE(READ "${infile}" _RC_FILE_CONTENTS)
-      STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
-      SET(_RC_DEPENDS)
-      FOREACH(_RC_FILE ${_RC_FILES})
-        STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
-        STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
-        IF(NOT _ABS_PATH_INDICATOR)
-          SET(_RC_FILE "${rc_path}/${_RC_FILE}")
-        ENDIF(NOT _ABS_PATH_INDICATOR)
-        SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
-      ENDFOREACH(_RC_FILE)
-      ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
-        COMMAND ${QT_RCC_EXECUTABLE}
-        ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
-        MAIN_DEPENDENCY ${infile}
-        DEPENDS ${_RC_DEPENDS})
-      SET(${outfiles} ${${outfiles}} ${outfile})
-    ENDFOREACH (it)
-
-  ENDMACRO (QT4_ADD_RESOURCES)
-
-  MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
-    GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE)
-    SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
-    SET(_impl   ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
-    SET(_moc    ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
-
-    GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE)
-    IF ( _nonamespace )
-        SET(_params -N -m)
-    ELSE ( _nonamespace )
-        SET(_params -m)
-    ENDIF ( _nonamespace )
-
-    GET_SOURCE_FILE_PROPERTY(_include ${_interface} INCLUDE)
-    IF ( _include )
-        SET(_params ${_params} -i ${_include})
-    ENDIF ( _include )
-
-    ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
-        COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile}
-        DEPENDS ${_infile})
-  
-    SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
-    
-    QT4_GENERATE_MOC(${_header} ${_moc})
-  
-    SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
-    MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
-  
-  ENDMACRO(QT4_ADD_DBUS_INTERFACE)
-  
-  
-  MACRO(QT4_ADD_DBUS_INTERFACES _sources)
-     FOREACH (_current_FILE ${ARGN})
-        GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE)
-        # get the part before the ".xml" suffix
-        STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE})
-        STRING(TOLOWER ${_basename} _basename)
-        QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface)
-     ENDFOREACH (_current_FILE)
-  ENDMACRO(QT4_ADD_DBUS_INTERFACES)
-  
-  
-  MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options )
-    QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options ${ARGN})
-
-    GET_FILENAME_COMPONENT(_in_file ${_header} ABSOLUTE)
-    GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE)
-    
-    IF (_customName)
-      SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName})
-    ELSE (_customName)
-      SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml)
-    ENDIF (_customName)
-  
-    ADD_CUSTOM_COMMAND(OUTPUT ${_target}
-        COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} > ${_target}
-        DEPENDS ${_in_file}
-    )
-  ENDMACRO(QT4_GENERATE_DBUS_INTERFACE)
-  
-  
-  MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename _optionalClassName)
-    GET_FILENAME_COMPONENT(_infile ${_xml_file} ABSOLUTE)
-    
-    SET(_optionalBasename "${ARGV4}")
-    IF (_optionalBasename)
-       SET(_basename ${_optionalBasename} )
-    ELSE (_optionalBasename)
-       STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2adaptor" _basename ${_infile})
-       STRING(TOLOWER ${_basename} _basename)
-    ENDIF (_optionalBasename)
-
-    SET(_optionalClassName "${ARGV5}")
-    SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
-    SET(_impl   ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
-    SET(_moc    ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
-
-    IF(_optionalClassName)
-       ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
-          COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
-          DEPENDS ${_infile}
-        )
-    ELSE(_optionalClassName)
-       ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
-          COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
-          DEPENDS ${_infile}
-        )
-    ENDIF(_optionalClassName)
-
-    QT4_GENERATE_MOC(${_header} ${_moc})
-    SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
-    MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
-
-    SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
-  ENDMACRO(QT4_ADD_DBUS_ADAPTOR)
-
-   MACRO(QT4_AUTOMOC)
-      QT4_GET_MOC_INC_DIRS(_moc_INCS)
-
-      SET(_matching_FILES )
-      FOREACH (_current_FILE ${ARGN})
-
-         GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
-         # if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
-         # This is required to make uic work correctly:
-         # we need to add generated .cpp files to the sources (to compile them),
-         # but we cannot let automoc handle them, as the .cpp files don't exist yet when
-         # cmake is run for the very first time on them -> however the .cpp files might
-         # exist at a later run. at that time we need to skip them, so that we don't add two
-         # different rules for the same moc file
-         GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC)
-
-         IF ( NOT _skip AND EXISTS ${_abs_FILE} )
-
-            FILE(READ ${_abs_FILE} _contents)
-
-            GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH)
-
-            STRING(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}")
-            IF(_match)
-               FOREACH (_current_MOC_INC ${_match})
-                  STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
-
-                  GET_filename_component(_basename ${_current_MOC} NAME_WE)
-   #               SET(_header ${CMAKE_CURRENT_SOURCE_DIR}/${_basename}.h)
-                  SET(_header ${_abs_PATH}/${_basename}.h)
-                  SET(_moc    ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
-                  ADD_CUSTOM_COMMAND(OUTPUT ${_moc}
-                     COMMAND ${QT_MOC_EXECUTABLE}
-                     ARGS ${_moc_INCS} ${_header} -o ${_moc}
-                     DEPENDS ${_header}
-                  )
-
-                  MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
-               ENDFOREACH (_current_MOC_INC)
-            ENDIF(_match)
-         ENDIF ( NOT _skip AND EXISTS ${_abs_FILE} )
-      ENDFOREACH (_current_FILE)
-   ENDMACRO(QT4_AUTOMOC)
-
-
-
-  ######################################
-  #
-  #       decide if Qt got found
-  #
-  ######################################
-
-  # if the includes,libraries,moc,uic and rcc are found then we have it
-  IF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
-    SET( QT4_FOUND "YES" )
-    IF( NOT Qt4_FIND_QUIETLY)
-      MESSAGE(STATUS "Found Qt-Version ${QTVERSION} (using ${QT_QMAKE_EXECUTABLE})")
-    ENDIF( NOT Qt4_FIND_QUIETLY)
-  ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
-    SET( QT4_FOUND "NO")
-    SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
-    IF( Qt4_FIND_REQUIRED)
-      IF ( NOT QT_LIBRARY_DIR )
-        MESSAGE(STATUS "Qt libraries NOT found!")
-      ENDIF(NOT QT_LIBRARY_DIR )
-      IF ( NOT QT_INCLUDE_DIR )
-        MESSAGE(STATUS "Qt includes NOT found!")
-      ENDIF( NOT QT_INCLUDE_DIR )
-      IF ( NOT QT_MOC_EXECUTABLE )
-        MESSAGE(STATUS "Qt's moc NOT found!")
-      ENDIF( NOT QT_MOC_EXECUTABLE )
-      IF ( NOT QT_UIC_EXECUTABLE )
-        MESSAGE(STATUS "Qt's uic NOT found!")
-      ENDIF( NOT QT_UIC_EXECUTABLE )
-      IF ( NOT QT_RCC_EXECUTABLE )
-        MESSAGE(STATUS "Qt's rcc NOT found!")
-      ENDIF( NOT QT_RCC_EXECUTABLE )
-      MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!")
-    ENDIF( Qt4_FIND_REQUIRED)
-  ENDIF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND  QT_RCC_EXECUTABLE)
-  SET(QT_FOUND ${QT4_FOUND})
-
-
-  #######################################
-  #
-  #       System dependent settings  
-  #
-  #######################################
-  # for unix add X11 stuff
-  IF(UNIX)
-    # on OS X X11 may not be required
-    IF (Q_WS_X11)
-      FIND_PACKAGE(X11 REQUIRED)
-    ENDIF (Q_WS_X11)
-    FIND_PACKAGE(Threads)
-    SET(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
-  ENDIF(UNIX)
-
-
-  #######################################
-  #
-  #       compatibility settings 
-  #
-  #######################################
-  # Backwards compatibility for CMake1.4 and 1.2
-  SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
-  SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
-
-  SET( QT_QT_LIBRARY "")
-
-ELSE(QT4_QMAKE_FOUND)
-   
-   SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
-   IF(Qt4_FIND_REQUIRED)
-      IF(QT4_INSTALLED_VERSION_TOO_OLD)
-         MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
-      ELSE(QT4_INSTALLED_VERSION_TOO_OLD)
-         MESSAGE( FATAL_ERROR "Qt qmake not found!")
-      ENDIF(QT4_INSTALLED_VERSION_TOO_OLD)
-   ELSE(Qt4_FIND_REQUIRED)
-      IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
-         MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
-      ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
-   ENDIF(Qt4_FIND_REQUIRED)
- 
-ENDIF (QT4_QMAKE_FOUND)
-ENDIF (QT4_QMAKE_FOUND)
-